From e827545e376ac14708c0ba88d8cae765e4516078 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 15:43:05 +0000 Subject: [PATCH 1/9] opam: update constraints from opam-repository Signed-off-by: David Scott --- protocol-9p-tool.opam | 4 ++-- protocol-9p-unix.opam | 14 +++++++------- protocol-9p.opam | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/protocol-9p-tool.opam b/protocol-9p-tool.opam index a07e377..9029c18 100644 --- a/protocol-9p-tool.opam +++ b/protocol-9p-tool.opam @@ -14,12 +14,12 @@ depends: [ "rresult" "logs" {>= "0.5.0"} "fmt" - "lambda-term" {>= "2.0.0"} + "lambda-term" {< "2.0"} "win-error" "cmdliner" ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} ["dune" "build" "-p" name "-j" jobs] ] dev-repo: "git+https://github.com/mirage/ocaml-9p.git" diff --git a/protocol-9p-unix.opam b/protocol-9p-unix.opam index 9e55fe0..c0e94f9 100644 --- a/protocol-9p-unix.opam +++ b/protocol-9p-unix.opam @@ -10,13 +10,13 @@ depends: [ "dune" {>= "1.0"} "protocol-9p" {>="1.0.1"} "base-bytes" - "cstruct" {>= "3.0.0"} - "cstruct-lwt" {>= "3.0.0"} - "sexplib" {> "113.00.00"} + "cstruct" {>= "3.0.0" & < "6.0.0"} + "cstruct-lwt" {>= "3.0.0" & < "6.0.0"} + "sexplib" {> "113.00.00" & < "v0.15"} "prometheus" "rresult" - "mirage-flow" {>= "2.0.0"} - "mirage-channel" {>= "4.0.0"} + "mirage-flow-lwt" + "mirage-channel-lwt" "lwt" {>= "3.0.0"} "base-unix" "astring" @@ -24,11 +24,11 @@ depends: [ "logs" {>= "0.5.0"} "win-error" "io-page-unix" {>= "2.0.0"} - "ppx_sexp_conv" + "ppx_sexp_conv" {< "v0.15"} "alcotest" {with-test & >= "0.4.0"} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} ["dune" "build" "-p" name "-j" jobs] ["dune" "runtest" "-p" name "-j" jobs] {with-test} ] diff --git a/protocol-9p.opam b/protocol-9p.opam index f11542a..1a3f0af 100644 --- a/protocol-9p.opam +++ b/protocol-9p.opam @@ -9,22 +9,22 @@ depends: [ "ocaml" {>= "4.03.0"} "dune" {>= "1.0"} "base-bytes" - "cstruct" {>= "4.0.0"} + "cstruct" {>= "4.0.0" & < "6.0.0"} "cstruct-sexp" - "sexplib" {> "113.00.00"} + "sexplib" {> "113.00.00" & < "v0.15"} "rresult" - "mirage-flow" {>= "2.0.0"} - "mirage-channel" {>= "4.0.0"} + "mirage-flow-lwt" + "mirage-channel-lwt" "lwt" {>= "3.0.0"} "astring" "fmt" "logs" {>= "0.5.0"} "win-error" - "ppx_sexp_conv" {>="v0.9.0"} + "ppx_sexp_conv" {>= "v0.9.0" & < "v0.15"} "alcotest" {with-test & >= "0.4.0"} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} ["dune" "build" "-p" name "-j" jobs] ] dev-repo: "git+https://github.com/mirage/ocaml-9p.git" From 97a28ced5fb05d602ab67d6d72e8ae362cb249b7 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 15:44:46 +0000 Subject: [PATCH 2/9] Update to Cstruct.length, new in 6.0.0+ Signed-off-by: David Scott --- lib/protocol_9p_client.ml | 10 +++++----- lib/protocol_9p_request.ml | 12 ++++++------ lib/protocol_9p_response.ml | 8 ++++---- lib/protocol_9p_types.ml | 20 ++++++++++---------- lib_test/lofs_test.ml | 2 +- lib_test/tests.ml | 10 +++++----- protocol-9p-unix.opam | 4 ++-- protocol-9p.opam | 2 +- src/main.ml | 6 +++--- unix/flow_lwt_unix.ml | 2 +- unix/lofs9p.ml | 4 ++-- 11 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lib/protocol_9p_client.ml b/lib/protocol_9p_client.ml index 353ae2e..fa7d2a7 100644 --- a/lib/protocol_9p_client.ml +++ b/lib/protocol_9p_client.ml @@ -392,7 +392,7 @@ module Make(Log: Protocol_9p_s.LOG)(FLOW: Mirage_flow.S) = struct openfid t newfid Types.OpenMode.write_only >>*= fun _ -> let rec loop offset remaining = - let len = Cstruct.len remaining in + let len = Cstruct.length remaining in if len = 0 then Lwt.return (Ok ()) else begin @@ -416,7 +416,7 @@ module Make(Log: Protocol_9p_s.LOG)(FLOW: Mirage_flow.S) = struct let to_request = min remaining t.maximum_payload in read t newfid offset to_request >>*= fun { Response.Read.data } -> - let n = Cstruct.len data in + let n = Cstruct.length data in if n = 0 then Lwt.return (Ok (List.rev acc)) else @@ -495,15 +495,15 @@ module Make(Log: Protocol_9p_s.LOG)(FLOW: Mirage_flow.S) = struct let rec loop acc offset = read t newfid offset t.maximum_payload >>*= fun { Response.Read.data } -> - if Cstruct.len data = 0 + if Cstruct.length data = 0 then Lwt.return (Ok acc) else (* Data should be an integral number of marshalled Stat.ts *) let module StatArray = Types.Arr(Types.Stat) in (Lwt.return (StatArray.read data)) >>*= fun (stats, rest) -> - assert (Cstruct.len rest = 0); - loop (acc @ stats) Int64.(add offset (of_int (Cstruct.len data))) in + assert (Cstruct.length rest = 0); + loop (acc @ stats) Int64.(add offset (of_int (Cstruct.length data))) in loop [] 0L ) diff --git a/lib/protocol_9p_request.ml b/lib/protocol_9p_request.ml index 7f451f5..a7cfbc3 100644 --- a/lib/protocol_9p_request.ml +++ b/lib/protocol_9p_request.ml @@ -78,7 +78,7 @@ module Auth = struct >>= fun (aname, rest) -> let uname = Data.to_string uname in let aname = Data.to_string aname in - if Cstruct.len rest = 0 + if Cstruct.length rest = 0 then return ({ afid; uname; aname; n_uname = None }, rest) else Int32.read rest @@ -143,7 +143,7 @@ module Attach = struct >>= fun (aname, rest) -> let uname = Data.to_string uname in let aname = Data.to_string aname in - if Cstruct.len rest = 0 + if Cstruct.length rest = 0 then return ({ fid; afid; uname; aname; n_uname = None }, rest) else Int32.read rest @@ -259,7 +259,7 @@ module Create = struct OpenMode.read rest >>= fun (mode, rest) -> let name = Data.to_string name in - if Cstruct.len rest = 0 + if Cstruct.length rest = 0 then return ({ fid; name; perm; mode; extension = None}, rest) else Data.read rest @@ -306,14 +306,14 @@ module Write = struct let sizeof_header = 4 + 8 + 4 - let sizeof t = (Fid.sizeof t.fid) + 8 + 4 + (Cstruct.len t.data) + let sizeof t = (Fid.sizeof t.fid) + 8 + 4 + (Cstruct.length t.data) let write t rest = Fid.write t.fid rest >>= fun rest -> Int64.write t.offset rest >>= fun rest -> - let len = Cstruct.len t.data in + let len = Cstruct.length t.data in Int32.write (Int32.of_int len) rest >>= fun rest -> big_enough_for "Write.data" rest len @@ -501,7 +501,7 @@ let pp ppf = function | { tag; payload = Write { Write.fid; offset; data } } -> let tag = Types.Tag.to_int tag in let fid = Types.Fid.to_int32 fid in - let len = Cstruct.len data in + let len = Cstruct.length data in Format.fprintf ppf "tag %d Write(fid: %ld, offset: %Ld, len(data): %d)" tag fid offset len | t -> Sexplib.Sexp.pp_hum ppf (sexp_of_t t) diff --git a/lib/protocol_9p_response.ml b/lib/protocol_9p_response.ml index 85c8284..92e3f23 100644 --- a/lib/protocol_9p_response.ml +++ b/lib/protocol_9p_response.ml @@ -58,7 +58,7 @@ module Err = struct Data.read buf >>= fun (ename, rest) -> let ename = Data.to_string ename in - if Cstruct.len rest = 0 + if Cstruct.length rest = 0 then return ({ ename; errno = None }, rest) else Int32.read rest @@ -183,10 +183,10 @@ module Read = struct let sizeof_header = 4 - let sizeof t = sizeof_header + (Cstruct.len t.data) + let sizeof t = sizeof_header + (Cstruct.length t.data) let write t rest = - let len = Cstruct.len t.data in + let len = Cstruct.length t.data in Int32.write (Int32.of_int len) rest >>= fun rest -> big_enough_for "Read.data" rest len @@ -368,7 +368,7 @@ let read rest = let pp ppf = function | { tag; payload = Read { Read.data } } -> let tag = Types.Tag.to_int tag in - let len = Cstruct.len data in + let len = Cstruct.length data in Format.fprintf ppf "tag %d Read(len(data): %d)" tag len | t -> Sexplib.Sexp.pp_hum ppf (sexp_of_t t) diff --git a/lib/protocol_9p_types.ml b/lib/protocol_9p_types.ml index a0dc158..6a7a340 100644 --- a/lib/protocol_9p_types.ml +++ b/lib/protocol_9p_types.ml @@ -18,7 +18,7 @@ open Sexplib.Std open Protocol_9p_error let big_enough_for name buf needed = - let length = Cstruct.len buf in + let length = Cstruct.length buf in if length < needed then error_msg "%s: buffer too small (%d < %d)" name length needed else return () @@ -490,17 +490,17 @@ module Data = struct let to_string x = Cstruct.to_string x - let sizeof t = 2 + (Cstruct.len t) + let sizeof t = 2 + (Cstruct.length t) let read buf = - let length = Cstruct.len buf in + let length = Cstruct.length buf in ( if length < 2 then error_msg "Buffer is too short to contain a string length" else return () ) >>= fun () -> let required = Cstruct.LE.get_uint16 buf 0 in let rest = Cstruct.shift buf 2 in - let remaining = Cstruct.len rest in + let remaining = Cstruct.length rest in ( if remaining < required then error_msg "Buffer is too short to contain string payload" else return () @@ -510,14 +510,14 @@ module Data = struct return (data, rest) let write t buf = - let length = Cstruct.len buf in + let length = Cstruct.length buf in let needed = sizeof t in ( if length < needed then error_msg "Buffer is too small for Data.t (%d < %d)" needed length else return () ) >>= fun () -> - Cstruct.LE.set_uint16 buf 0 (Cstruct.len t); - Cstruct.blit t 0 buf 2 (Cstruct.len t); + Cstruct.LE.set_uint16 buf 0 (Cstruct.length t); + Cstruct.blit t 0 buf 2 (Cstruct.length t); return (Cstruct.shift buf needed) end @@ -630,7 +630,7 @@ module Stat = struct let t = { ty; dev; qid; mode; atime; mtime; length; name; uid; gid; muid; u = None } in (* We are often decoding contiguous arrays of Stat structures, so we must use the sz field to discover where the data ends. *) - let consumed = Cstruct.len buf - (Cstruct.len rest) in + let consumed = Cstruct.length buf - (Cstruct.length rest) in if consumed = sz + 2 (* Size of the sz field itself *) then return (t, rest) else @@ -645,7 +645,7 @@ module Stat = struct >>= fun (n_muid, rest) -> let u = Some { extension; n_uid; n_gid; n_muid } in (* In case of future extensions, remove trailing garbage *) - let consumed = Cstruct.len buf - (Cstruct.len rest) in + let consumed = Cstruct.length buf - (Cstruct.length rest) in let trailing_garbage = consumed - sz - 2 in let rest = Cstruct.shift rest trailing_garbage in return ({ t with u }, rest) @@ -702,7 +702,7 @@ module Arr(T: Protocol_9p_s.SERIALISABLE) = struct let read rest = let rec loop acc rest = - if Cstruct.len rest = 0 + if Cstruct.length rest = 0 then return (List.rev acc, rest) else T.read rest diff --git a/lib_test/lofs_test.ml b/lib_test/lofs_test.ml index 53e7f36..203730a 100644 --- a/lib_test/lofs_test.ml +++ b/lib_test/lofs_test.ml @@ -245,7 +245,7 @@ let check_directory_boundary_read () = | Error (`Msg err) -> Alcotest.fail ("client1: read: " ^ err) | Ok { Response.Read.data } -> - let n = Cstruct.len data in + let n = Cstruct.length data in if n = 0 then Lwt.return (Ok ()) else Alcotest.fail ("client1: read non-zero: " ^ (string_of_int n)) diff --git a/lib_test/tests.ml b/lib_test/tests.ml index 55ba72e..01bf7a4 100644 --- a/lib_test/tests.ml +++ b/lib_test/tests.ml @@ -25,7 +25,7 @@ let () = let example_data = let data = Cstruct.create 1 in - for i = 0 to Cstruct.len data - 1 do + for i = 0 to Cstruct.length data - 1 do Cstruct.set_char data i '\000' done; data @@ -129,10 +129,10 @@ let print_parse_request r () = Request.write r buf >>= fun remaining -> Cstruct.hexdump buf; - Alcotest.(check int) "write request" 0 (Cstruct.len remaining); + Alcotest.(check int) "write request" 0 (Cstruct.length remaining); Request.read (Cstruct.shift buf len_size) >>= fun (r', remaining) -> - Alcotest.(check int) "read request" 0 (Cstruct.len remaining); + Alcotest.(check int) "read request" 0 (Cstruct.length remaining); Alcotest.(check request) "request" r r'; return () ) @@ -144,10 +144,10 @@ let print_parse_response r () = let buf = Cstruct.create needed in Response.write r buf >>= fun remaining -> - Alcotest.(check int) "write response" 0 (Cstruct.len remaining); + Alcotest.(check int) "write response" 0 (Cstruct.length remaining); Response.read (Cstruct.shift buf len_size) >>= fun (r', remaining) -> - Alcotest.(check int) "read respsonse" 0 (Cstruct.len remaining); + Alcotest.(check int) "read respsonse" 0 (Cstruct.length remaining); Alcotest.(check response) "response" r r'; return () ) diff --git a/protocol-9p-unix.opam b/protocol-9p-unix.opam index c0e94f9..06bf606 100644 --- a/protocol-9p-unix.opam +++ b/protocol-9p-unix.opam @@ -10,8 +10,8 @@ depends: [ "dune" {>= "1.0"} "protocol-9p" {>="1.0.1"} "base-bytes" - "cstruct" {>= "3.0.0" & < "6.0.0"} - "cstruct-lwt" {>= "3.0.0" & < "6.0.0"} + "cstruct" {>= "6.0.0"} + "cstruct-lwt" {>= "6.0.0"} "sexplib" {> "113.00.00" & < "v0.15"} "prometheus" "rresult" diff --git a/protocol-9p.opam b/protocol-9p.opam index 1a3f0af..ec4a67b 100644 --- a/protocol-9p.opam +++ b/protocol-9p.opam @@ -9,7 +9,7 @@ depends: [ "ocaml" {>= "4.03.0"} "dune" {>= "1.0"} "base-bytes" - "cstruct" {>= "4.0.0" & < "6.0.0"} + "cstruct" {>= "6.0.0"} "cstruct-sexp" "sexplib" {> "113.00.00" & < "v0.15"} "rresult" diff --git a/src/main.ml b/src/main.ml index bed9211..9223de2 100644 --- a/src/main.ml +++ b/src/main.ml @@ -85,7 +85,7 @@ let read debug address path username = let rec loop offset = Client.read t path offset two_mib >>*= fun data -> - let len = List.fold_left (+) 0 (List.map (fun x -> Cstruct.len x) data) in + let len = List.fold_left (+) 0 (List.map (fun x -> Cstruct.length x) data) in if len = 0 then return (Ok ()) else begin @@ -266,7 +266,7 @@ let shell debug address username = print_endline m; return () | Ok bufs -> - let len = List.fold_left (+) 0 (List.map Cstruct.len bufs) in + let len = List.fold_left (+) 0 (List.map Cstruct.length bufs) in List.iter (fun x -> output_string stdout (Cstruct.to_string x)) bufs; flush stdout; if Int32.of_int len < requested @@ -278,7 +278,7 @@ let shell debug address username = | "write" :: file :: rest -> let data = String.concat ~sep:" " rest in let buf = Cstruct.create (String.length data) in - Cstruct.blit_from_string data 0 buf 0 (Cstruct.len buf); + Cstruct.blit_from_string data 0 buf 0 (Cstruct.length buf); begin Client.write t (!cwd @ [ file ]) 0L buf >>= function diff --git a/unix/flow_lwt_unix.ml b/unix/flow_lwt_unix.ml index 8e96109..49fa858 100644 --- a/unix/flow_lwt_unix.ml +++ b/unix/flow_lwt_unix.ml @@ -55,7 +55,7 @@ let safe op f r = let read flow = if flow.closed then Lwt.return (Ok `Eof) else begin - if Cstruct.len flow.read_buffer = 0 + if Cstruct.length flow.read_buffer = 0 then flow.read_buffer <- Cstruct.create flow.read_buffer_size; safe Lwt_cstruct.read flow.fd flow.read_buffer >|= function | 0 -> Ok `Eof diff --git a/unix/lofs9p.ml b/unix/lofs9p.ml index 9c0d98f..a20f14a 100644 --- a/unix/lofs9p.ml +++ b/unix/lofs9p.ml @@ -217,7 +217,7 @@ let make root = { root } let n = Types.Stat.sizeof stat in if off < offset then write Int64.(add off (of_int n)) rest xs - else if Cstruct.len rest < n then Lwt.return (Ok off) + else if Cstruct.length rest < n then Lwt.return (Ok off) else Lwt.return (Types.Stat.write stat rest) >>*= fun rest -> @@ -430,7 +430,7 @@ let make root = { root } (fun () -> Lwt_unix.LargeFile.lseek fd offset Lwt_unix.SEEK_SET >>= fun _cursor -> - let len = Cstruct.len data in + let len = Cstruct.length data in Lwt_unix.write fd (Bytes.of_string (Cstruct.to_string data)) 0 len ) >>= fun written -> From fdec64601f3d35f61109f4e7c889444b9ea23d53 Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 15:47:02 +0000 Subject: [PATCH 3/9] Avoid using deprecated Fmt functions Signed-off-by: David Scott --- lib/protocol_9p_buffered9PReader.ml | 2 +- lib/protocol_9p_error.ml | 2 +- lib_test/tests.ml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/protocol_9p_buffered9PReader.ml b/lib/protocol_9p_buffered9PReader.ml index 6c98617..ffe35f9 100644 --- a/lib/protocol_9p_buffered9PReader.ml +++ b/lib/protocol_9p_buffered9PReader.ml @@ -39,7 +39,7 @@ module Make(Log: Protocol_9p_s.LOG)(FLOW: Mirage_flow.S) = struct C.read_exactly ~len c >>= function | Ok (`Data bufs) -> Lwt.return (Ok (Cstruct.concat bufs)) | Ok `Eof -> Lwt.return (Error `Eof) - | Error e -> Lwt.return (Error (`Msg (Fmt.strf "%a" C.pp_error e))) + | Error e -> Lwt.return (Error (`Msg (Fmt.str "%a" C.pp_error e))) let read_must_have_lock t = let len_size = 4 in diff --git a/lib/protocol_9p_error.ml b/lib/protocol_9p_error.ml index 8cdf10c..2288d6a 100644 --- a/lib/protocol_9p_error.ml +++ b/lib/protocol_9p_error.ml @@ -23,7 +23,7 @@ type 'a t = ('a, error) result let return x = Ok x -let error_msg fmt = Fmt.kstrf (fun s -> Error (`Msg s)) fmt +let error_msg fmt = Fmt.kstr (fun s -> Error (`Msg s)) fmt let ( >>= ) m f = match m with | Error x -> Error x diff --git a/lib_test/tests.ml b/lib_test/tests.ml index 01bf7a4..d79b164 100644 --- a/lib_test/tests.ml +++ b/lib_test/tests.ml @@ -157,7 +157,7 @@ let test_requests = List.map (fun r -> ) requests let test_responses = List.map (fun r -> - Fmt.strf "print then parser random response", `Quick, print_parse_response r + Fmt.str "print then parser random response", `Quick, print_parse_response r ) responses let tests = [ From 6545deb0d7912c07a7127254184701d48c4aeffe Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 15:54:02 +0000 Subject: [PATCH 4/9] Builds ok with latest lambda-term (3.1.0) Signed-off-by: David Scott --- protocol-9p-tool.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol-9p-tool.opam b/protocol-9p-tool.opam index 9029c18..d1717cd 100644 --- a/protocol-9p-tool.opam +++ b/protocol-9p-tool.opam @@ -14,7 +14,7 @@ depends: [ "rresult" "logs" {>= "0.5.0"} "fmt" - "lambda-term" {< "2.0"} + "lambda-term" "win-error" "cmdliner" ] From 51146fc9d05c71b113806e7c01f22e95244bc54c Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 15:55:46 +0000 Subject: [PATCH 5/9] Prepare CHANGES.md for 2.0.2 Signed-off-by: David Scott --- CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 6424fb4..1619ab0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +## v2.0.2 (2021-01-16) + +* Update to Cstruct.length in cstruct.6.0.0 and use Fmt.str + rather than Fmt.strf (@djs55) + ## v2.0.1 (2019-03-26) * Use cstruct-sexp introduced in cstruct.4.0.0 (@avsm) From f68c8ba514d780a6267f42ece56897f20e15658c Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 16:07:06 +0000 Subject: [PATCH 6/9] dune: add missing dependency on logs Signed-off-by: David Scott --- lib/dune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dune b/lib/dune index 68f54da..d9eeb09 100644 --- a/lib/dune +++ b/lib/dune @@ -2,6 +2,6 @@ (name protocol_9p) (public_name protocol-9p) (libraries rresult cstruct cstruct-sexp sexplib lwt mirage-flow mirage-channel - astring fmt) + astring fmt logs) (preprocess (pps ppx_sexp_conv))) From 087de0f09ae92bdd622aae3180a5450ba007665f Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 16:20:49 +0000 Subject: [PATCH 7/9] opam: add lower-bounds on mirage-flow and mirage-channel Signed-off-by: David Scott --- protocol-9p-unix.opam | 4 ++-- protocol-9p.opam | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/protocol-9p-unix.opam b/protocol-9p-unix.opam index 06bf606..36cafea 100644 --- a/protocol-9p-unix.opam +++ b/protocol-9p-unix.opam @@ -15,8 +15,8 @@ depends: [ "sexplib" {> "113.00.00" & < "v0.15"} "prometheus" "rresult" - "mirage-flow-lwt" - "mirage-channel-lwt" + "mirage-flow" {>= "3.0.0"} + "mirage-channel" {>= "4.0.0"} "lwt" {>= "3.0.0"} "base-unix" "astring" diff --git a/protocol-9p.opam b/protocol-9p.opam index ec4a67b..c6ef04b 100644 --- a/protocol-9p.opam +++ b/protocol-9p.opam @@ -13,8 +13,8 @@ depends: [ "cstruct-sexp" "sexplib" {> "113.00.00" & < "v0.15"} "rresult" - "mirage-flow-lwt" - "mirage-channel-lwt" + "mirage-flow" {>= "3.0.0"} + "mirage-channel" {>= "4.0.0"} "lwt" {>= "3.0.0"} "astring" "fmt" From d03a6fdd5647197a7210676e53f32a2ef53f774f Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 16:35:31 +0000 Subject: [PATCH 8/9] appveyor: update to OCaml 4.08 Signed-off-by: David Scott --- appveyor.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8136771..fd3a885 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,11 +2,13 @@ platform: - x86 environment: - FORK_USER: ocaml - FORK_BRANCH: master - PINS: "protocol-9p:. protocol-9p-tool:. protocol-9p-unix:." - PACKAGE: protocol-9p-unix - CYG_ROOT: C:\cygwin64 + global: + FORK_USER: ocaml + FORK_BRANCH: master + CYG_ROOT: C:\cygwin64 + PINS: "protocol-9p:. protocol-9p-tool:. protocol-9p-unix:." + PACKAGE: protocol-9p-unix + OPAM_SWITCH: 4.08.0+mingw64c install: - ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/$env:FORK_USER/ocaml-ci-scripts/$env:FORK_BRANCH/appveyor-install.ps1")) From 33937d44b8a77b9cfda19bb609bc2d22f6412a9b Mon Sep 17 00:00:00 2001 From: David Scott Date: Sun, 16 Jan 2022 19:49:21 +0000 Subject: [PATCH 9/9] protocol-9p-unix: fix lint with {with-test} Signed-off-by: David Scott --- protocol-9p-unix.opam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol-9p-unix.opam b/protocol-9p-unix.opam index 36cafea..ced738c 100644 --- a/protocol-9p-unix.opam +++ b/protocol-9p-unix.opam @@ -16,12 +16,12 @@ depends: [ "prometheus" "rresult" "mirage-flow" {>= "3.0.0"} - "mirage-channel" {>= "4.0.0"} + "mirage-channel" {with-test & >= "4.0.0"} "lwt" {>= "3.0.0"} "base-unix" "astring" "fmt" - "logs" {>= "0.5.0"} + "logs" {with-test & >= "0.5.0"} "win-error" "io-page-unix" {>= "2.0.0"} "ppx_sexp_conv" {< "v0.15"}