From 11ec1f6c0493c203b413744b37af4db04c7e26a7 Mon Sep 17 00:00:00 2001 From: Tim McGilchrist Date: Fri, 16 Aug 2024 10:45:43 +1000 Subject: [PATCH] Silence Async deprecation warnings. --- CHANGES.md | 2 +- async/dune | 3 ++- async/gluten_async.ml | 6 +++--- dune-project | 4 ++-- gluten-async.opam | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f854d4a..d82990c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ unreleased -------------- -- gluten-async: update async and core to v0.17.0 +- gluten-async: Silence async deprecation warnings ([#78)(https://github.com/anmonteiro/gluten/pull/78)) 0.5.1 2024-06-04 diff --git a/async/dune b/async/dune index 280c42e..90bbc27 100644 --- a/async/dune +++ b/async/dune @@ -18,4 +18,5 @@ from (tls-async -> tls_io.real.ml) (!tls-async -> tls_io.dummy.ml))) - (modules gluten_async gluten_async_intf ssl_io tls_io)) + (modules gluten_async gluten_async_intf ssl_io tls_io) + (flags (:standard -w -3))) diff --git a/async/gluten_async.ml b/async/gluten_async.ml index 7a84d3f..4e388cb 100644 --- a/async/gluten_async.ml +++ b/async/gluten_async.ml @@ -44,7 +44,7 @@ module Make_IO_Loop (Io : Gluten_async_intf.IO) = struct Buffer.put ~f:(fun buf ~off ~len k -> Async.upon (Io.read socket buf ~off ~len) k) read_buffer - (fun n -> Ivar.fill_exn ivar n); + (fun n -> Ivar.fill ivar n); Ivar.read ivar let start : @@ -76,7 +76,7 @@ module Make_IO_Loop (Io : Gluten_async_intf.IO) = struct Runtime.yield_reader t reader_thread; Deferred.return () | `Close -> - Ivar.fill_exn read_complete (); + Ivar.fill read_complete (); Io.shutdown_receive socket; Deferred.return () in @@ -91,7 +91,7 @@ module Make_IO_Loop (Io : Gluten_async_intf.IO) = struct Runtime.report_write_result t result; writer_thread () | `Yield -> Runtime.yield_writer t writer_thread - | `Close _ -> Ivar.fill_exn write_complete () + | `Close _ -> Ivar.fill write_complete () in let conn_monitor = Monitor.create () in Scheduler.within ~monitor:conn_monitor reader_thread; diff --git a/dune-project b/dune-project index 0322b87..b4ba9ee 100644 --- a/dune-project +++ b/dune-project @@ -87,9 +87,9 @@ (faraday-async (>= "0.7.3")) (async - (>= "v0.17.0")) + (>= "v0.15.0")) (core - (>= "v0.17.0"))) + (>= "v0.15.0"))) (depopts async_ssl tls-async)) (package diff --git a/gluten-async.opam b/gluten-async.opam index f2a38dc..5fc2f46 100644 --- a/gluten-async.opam +++ b/gluten-async.opam @@ -11,8 +11,8 @@ depends: [ "ocaml" {>= "4.08.0"} "gluten" {= version} "faraday-async" {>= "0.7.3"} - "async" {>= "v0.17.0"} - "core" {>= "v0.17.0"} + "async" {>= "v0.15.0"} + "core" {>= "v0.15.0"} "odoc" {with-doc} ] depopts: ["async_ssl" "tls-async"]