mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-15 06:49:56 -04:00
compatibility with lwt 6 (#128)
* compatibility with lwt 6 * try to work for lwt 5 and lwt 6 * CI: try lwt 5 then lwt 6 * only try lwt 6 on OCaml >= 5 * relax lwt bounds * more robust dune rule * CI --------- Co-authored-by: Simon Cruanes <simon.cruanes.2007@m4x.org>
This commit is contained in:
parent
c0d949259f
commit
74022be198
5 changed files with 27 additions and 4 deletions
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
|
|
@ -42,10 +42,8 @@ jobs:
|
||||||
allow-prerelease-opam: true
|
allow-prerelease-opam: true
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
opam pin trace https://github.com/ocaml-tracing/ocaml-trace.git#main -y -n
|
|
||||||
opam pin https://github.com/ocaml-tracing/ambient-context.git#HEAD -y -n
|
|
||||||
opam install pbrt.4.0 -y
|
opam install pbrt.4.0 -y
|
||||||
opam install ambient-context
|
opam install ambient-context lwt.5.9.2
|
||||||
|
|
||||||
# We cannot install packages that need eio on ocaml versions before 5
|
# We cannot install packages that need eio on ocaml versions before 5
|
||||||
- run: |
|
- run: |
|
||||||
|
|
@ -62,6 +60,11 @@ jobs:
|
||||||
- run: opam install trace
|
- run: opam install trace
|
||||||
- run: opam exec -- dune build @install -p opentelemetry
|
- run: opam exec -- dune build @install -p opentelemetry
|
||||||
|
|
||||||
|
- run: opam install lwt.6.1.1 -y
|
||||||
|
if: ${{ matrix.ocaml-compiler == '5.3.x' }}
|
||||||
|
- run: opam exec -- dune build @install -p opentelemetry,opentelemetry-client,opentelemetry-lwt,opentelemetry-client-cohttp-lwt
|
||||||
|
if: ${{ matrix.ocaml-compiler == '5.3.x' }}
|
||||||
|
|
||||||
- run: opam install ocaml-protoc
|
- run: opam install ocaml-protoc
|
||||||
- run: opam exec -- dune build @lint
|
- run: opam exec -- dune build @lint
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,19 @@
|
||||||
mtime.clock.os
|
mtime.clock.os
|
||||||
lwt.unix)
|
lwt.unix)
|
||||||
(synopsis "Lwt-specific helpers for opentelemetry-client"))
|
(synopsis "Lwt-specific helpers for opentelemetry-client"))
|
||||||
|
|
||||||
|
(rule
|
||||||
|
(enabled_if
|
||||||
|
(and
|
||||||
|
%{lib-available:lwt}
|
||||||
|
(>= %{version:lwt} 6.0)))
|
||||||
|
(action
|
||||||
|
(copy types_.ml.6 types_.ml)))
|
||||||
|
|
||||||
|
(rule
|
||||||
|
(enabled_if
|
||||||
|
(and
|
||||||
|
%{lib-available:lwt}
|
||||||
|
(< %{version:lwt} 6.0)))
|
||||||
|
(action
|
||||||
|
(copy types_.ml.5 types_.ml)))
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ module IO = Io_lwt
|
||||||
type t = {
|
type t = {
|
||||||
notified: bool Atomic.t;
|
notified: bool Atomic.t;
|
||||||
cond: unit Lwt_condition.t;
|
cond: unit Lwt_condition.t;
|
||||||
notification: int;
|
notification: Types_.notification;
|
||||||
lwt_tid: int; (** thread ID where lwt runs *)
|
lwt_tid: int; (** thread ID where lwt runs *)
|
||||||
deleted: bool Atomic.t;
|
deleted: bool Atomic.t;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
src/client/lwt/types_.ml.5
Normal file
2
src/client/lwt/types_.ml.5
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
type notification = int
|
||||||
2
src/client/lwt/types_.ml.6
Normal file
2
src/client/lwt/types_.ml.6
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
type notification = Lwt_unix.notification
|
||||||
Loading…
Add table
Reference in a new issue