From c7bb94bd80ad775813a9ec795e038a1de5f68a29 Mon Sep 17 00:00:00 2001 From: Tim McGilchrist Date: Tue, 30 Jul 2024 08:36:45 +1000 Subject: [PATCH 1/2] Update windows.yml --- .github/workflows/windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e6a839f..8bf4a26 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -15,7 +15,8 @@ jobs: - windows-latest ocaml-compiler: - "ocaml.5.0.0,ocaml-option-mingw" - - "ocaml.5.1.0,ocaml-option-mingw" + - "ocaml.5.1.1,ocaml-option-mingw" + - "ocaml.5.2.0,ocaml-option-mingw" runs-on: ${{ matrix.os }} From e21cf672e3caf4285307b17a0318e44bf4cd446a Mon Sep 17 00:00:00 2001 From: Tim McGilchrist Date: Tue, 30 Jul 2024 08:48:32 +1000 Subject: [PATCH 2/2] Update async version and fix deprecation messages. --- CHANGES.md | 1 + dune-project | 4 ++-- grpc-async.opam | 2 +- grpc-examples.opam | 2 +- lib/grpc-async/client.ml | 6 +++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 873bd40..de15035 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ ## Unreleased - Fix bug in Grpc-lwt-client to fetch status code from response header ([#58](https://github.com/dialohq/ocaml-grpc/pull/58)) ([acerone85](https://github.com/acerone85)) review by ([@quernd](https://github.com/quernd)) +- Update Async dependency to v0.17.0 ([#62](https://github.com/dialohq/ocaml-grpc/pull/62) ([@tmcgilchrist](https://github.com/tmcgilchrist)) ## 0.2.0 2023-10-23 diff --git a/dune-project b/dune-project index 32c4d3a..9225673 100644 --- a/dune-project +++ b/dune-project @@ -69,7 +69,7 @@ (ocaml (>= 4.11)) (async - (>= v0.16)) + (>= v0.17)) (grpc (= :version)) (h2 @@ -100,7 +100,7 @@ (network rpc serialisation)) (depends (async - (>= v0.16.0)) + (>= v0.17.0)) cohttp cohttp-lwt cohttp-lwt-unix diff --git a/grpc-async.opam b/grpc-async.opam index fd4a3b4..8c3c8e7 100644 --- a/grpc-async.opam +++ b/grpc-async.opam @@ -21,7 +21,7 @@ bug-reports: "https://github.com/dialohq/ocaml-grpc/issues" depends: [ "dune" {>= "3.7"} "ocaml" {>= "4.11"} - "async" {>= "v0.16"} + "async" {>= "v0.17"} "grpc" {= version} "h2" {>= "0.9.0"} "ppx_jane" {>= "v0.16.0"} diff --git a/grpc-examples.opam b/grpc-examples.opam index 0091766..dcd6f62 100644 --- a/grpc-examples.opam +++ b/grpc-examples.opam @@ -19,7 +19,7 @@ doc: "https://dialohq.github.io/ocaml-grpc" bug-reports: "https://github.com/dialohq/ocaml-grpc/issues" depends: [ "dune" {>= "3.7"} - "async" {>= "v0.16.0"} + "async" {>= "v0.17.0"} "cohttp" "cohttp-lwt" "cohttp-lwt-unix" diff --git a/lib/grpc-async/client.ml b/lib/grpc-async/client.ml index 7331767..aa4ff42 100644 --- a/lib/grpc-async/client.ml +++ b/lib/grpc-async/client.ml @@ -21,12 +21,12 @@ let default_headers = [ ("te", "trailers"); ("content-type", "application/grpc+proto") ] let trailers_handler trailers_status_ivar headers = - Ivar.fill trailers_status_ivar (Grpc.Status.extract_status headers) + Async.Ivar.fill_exn trailers_status_ivar (Grpc.Status.extract_status headers) let response_handler read_body_ivar out_ivar (response : H2.Response.t) (body : H2.Body.Reader.t) = - Ivar.fill read_body_ivar body; - Ivar.fill out_ivar response + Async.Ivar.fill_exn read_body_ivar body; + Async.Ivar.fill_exn out_ivar response let call ~service ~rpc ?(scheme = "https") ~handler ~do_request ?(headers = default_headers) () =