From cbb106fb64ab6ead587d5893c3b9c5b80862d78c Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Wed, 26 Feb 2025 12:04:10 +0100 Subject: [PATCH] cohttp-mirage: support conduit 8.0.0 --- cohttp-mirage.opam | 4 ++-- cohttp-mirage/src/client.ml | 3 +-- cohttp-mirage/src/client.mli | 1 - cohttp-mirage/src/net.ml | 4 +--- cohttp-mirage/src/net.mli | 1 - 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/cohttp-mirage.opam b/cohttp-mirage.opam index aa5bd4545d..0b8eaead2d 100644 --- a/cohttp-mirage.opam +++ b/cohttp-mirage.opam @@ -31,8 +31,8 @@ depends: [ "ocaml" {>= "4.08"} "mirage-flow" {>= "2.0.0"} "mirage-channel" {>= "4.0.0"} - "conduit" {>= "2.0.2"} - "conduit-mirage" {>= "2.3.0"} + "conduit" {>= "8.0.0"} + "conduit-mirage" {>= "8.0.0"} "mirage-kv" {>= "3.0.0"} "lwt" {>= "2.4.3"} "cohttp-lwt" {= version} diff --git a/cohttp-mirage/src/client.ml b/cohttp-mirage/src/client.ml index 21fa829ab4..f058ea3cf1 100644 --- a/cohttp-mirage/src/client.ml +++ b/cohttp-mirage/src/client.ml @@ -18,11 +18,10 @@ *) module Make - (P : Mirage_clock.PCLOCK) (R : Resolver_mirage.S) (S : Conduit_mirage.S) = struct - module Net = Net.Make (P) (R) (S) + module Net = Net.Make (R) (S) module Connection = Cohttp_lwt.Connection.Make (Net) include Cohttp_lwt.Client.Make (Connection) diff --git a/cohttp-mirage/src/client.mli b/cohttp-mirage/src/client.mli index a67cb2345d..cdde0ab41a 100644 --- a/cohttp-mirage/src/client.mli +++ b/cohttp-mirage/src/client.mli @@ -1,5 +1,4 @@ module Make - (_ : Mirage_clock.PCLOCK) (R : Resolver_mirage.S) (S : Conduit_mirage.S) : sig module Connection : Cohttp_lwt.S.Connection diff --git a/cohttp-mirage/src/net.ml b/cohttp-mirage/src/net.ml index 72964fccb4..ce31d57e44 100644 --- a/cohttp-mirage/src/net.ml +++ b/cohttp-mirage/src/net.ml @@ -1,11 +1,9 @@ module Make - (P : Mirage_clock.PCLOCK) (R : Resolver_mirage.S) (S : Conduit_mirage.S) = struct module Channel = Mirage_channel.Make (S.Flow) module Input_channel = Input_channel.Make (Channel) - module Endpoint = Conduit_mirage.Endpoint (P) module IO = Io.Make (Channel) open IO @@ -25,7 +23,7 @@ struct let resolve ~ctx uri = R.resolve_uri ~uri ctx.resolver let connect_endp ~ctx endp = - Endpoint.client ?tls_authenticator:ctx.authenticator endp >>= fun client -> + Conduit_mirage.Endpoint.client ?tls_authenticator:ctx.authenticator endp >>= fun client -> match ctx.conduit with | None -> failwith "conduit not initialised" | Some c -> diff --git a/cohttp-mirage/src/net.mli b/cohttp-mirage/src/net.mli index 0a64dd7a51..71fcf688a0 100644 --- a/cohttp-mirage/src/net.mli +++ b/cohttp-mirage/src/net.mli @@ -1,5 +1,4 @@ module Make - (_ : Mirage_clock.PCLOCK) (R : Resolver_mirage.S) (S : Conduit_mirage.S) : sig type ctx = {