From a65e32e1407fb316799c05e9b64a54e9c2913552 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Tue, 7 Jul 2026 00:05:52 -0700 Subject: [PATCH] Require dune 3.17 for the wasm_of_ocaml stanza The wasm_of_ocaml (wasm_files ...) stanza needs dune language 3.17, so bump dune-project and the dune lower bound in every package -- otherwise opam may resolve an older dune (e.g. 2.3) that cannot parse the project. Lang 3.17 also makes the dev profile treat warning 32 (unused value) as an error, so drop the unused pp_cstruct in the fuzzer and use the compile-test binding in the lwt ppx test. --- cstruct-async.opam | 2 +- cstruct-lwt.opam | 2 +- cstruct-sexp.opam | 2 +- cstruct-unix.opam | 2 +- cstruct.opam | 2 +- dune-project | 4 +--- fuzz/fuzz.ml | 2 -- ppx_cstruct.opam | 2 +- ppx_test/with-lwt/ppx_cstruct_and_lwt.ml | 2 ++ 9 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cstruct-async.opam b/cstruct-async.opam index 340b9534..3fc684fb 100644 --- a/cstruct-async.opam +++ b/cstruct-async.opam @@ -15,7 +15,7 @@ build: [ ] depends: [ "ocaml" {>= "4.08.0"} - "dune" {>= "2.0.0"} + "dune" {>= "3.17"} "async" {>= "v0.9.0" & < "v0.17.0"} "async_unix" {>= "v0.9.0" & < "v0.17.0"} "core" {>= "v0.9.0" & < "v0.17.0"} diff --git a/cstruct-lwt.opam b/cstruct-lwt.opam index 4f702c75..dc5a9558 100644 --- a/cstruct-lwt.opam +++ b/cstruct-lwt.opam @@ -16,7 +16,7 @@ build: [ depends: [ "ocaml" {>= "4.08.0"} "base-unix" - "dune" {>= "2.0.0"} + "dune" {>= "3.17"} "lwt" "cstruct" {=version} ] diff --git a/cstruct-sexp.opam b/cstruct-sexp.opam index 6181a9cc..c9f6d85e 100644 --- a/cstruct-sexp.opam +++ b/cstruct-sexp.opam @@ -17,7 +17,7 @@ build: [ ] depends: [ "ocaml" {>= "4.08.0"} - "dune" {>= "2.0.0"} + "dune" {>= "3.17"} "sexplib" "cstruct" {=version} "alcotest" {with-test} diff --git a/cstruct-unix.opam b/cstruct-unix.opam index 0cda0a01..f6e099ff 100644 --- a/cstruct-unix.opam +++ b/cstruct-unix.opam @@ -16,7 +16,7 @@ build: [ ] depends: [ "ocaml" {>= "4.06.0"} - "dune" {>= "2.0.0"} + "dune" {>= "3.17"} "base-unix" "cstruct" {=version} ] diff --git a/cstruct.opam b/cstruct.opam index 6830762d..faa7d6d7 100644 --- a/cstruct.opam +++ b/cstruct.opam @@ -17,7 +17,7 @@ build: [ ] depends: [ "ocaml" {>= "4.08.0"} - "dune" {>= "2.0.0"} + "dune" {>= "3.17"} "alcotest" {with-test} "fmt" {>= "0.8.9"} "crowbar" {with-test & >= "0.2"} diff --git a/dune-project b/dune-project index 9517716c..5c627f8b 100644 --- a/dune-project +++ b/dune-project @@ -1,5 +1,3 @@ -(lang dune 2.0) - -(allow_approximate_merlin) +(lang dune 3.17) (name cstruct) diff --git a/fuzz/fuzz.ml b/fuzz/fuzz.ml index 75d2cfd9..f50a5bd5 100644 --- a/fuzz/fuzz.ml +++ b/fuzz/fuzz.ml @@ -25,8 +25,6 @@ let bytes = map [bytes] Bytes.unsafe_of_string let buffer = map [uint8] Bigarray.(Array1.create Char c_layout) -let pp_cstruct f c = Format.pp_print_string f (Cstruct.debug c) - let check_within ~base x = check Cstruct.(base.off <= x.off); check Cstruct.(base.off + base.len >= x.off + x.len); diff --git a/ppx_cstruct.opam b/ppx_cstruct.opam index 0c647ffa..3a2289ac 100644 --- a/ppx_cstruct.opam +++ b/ppx_cstruct.opam @@ -17,7 +17,7 @@ build: [ ] depends: [ "ocaml" {>= "4.08.0"} - "dune" {>= "2.0.0"} + "dune" {>= "3.17"} "cstruct" {=version} "ounit" {with-test} "ppxlib" {>= "0.16.0"} diff --git a/ppx_test/with-lwt/ppx_cstruct_and_lwt.ml b/ppx_test/with-lwt/ppx_cstruct_and_lwt.ml index 8fbd3b81..1a6455ed 100644 --- a/ppx_test/with-lwt/ppx_cstruct_and_lwt.ml +++ b/ppx_test/with-lwt/ppx_cstruct_and_lwt.ml @@ -13,3 +13,5 @@ type foo64 = let foo = let%lwt foo = Lwt.return () in Lwt.return foo + +let () = ignore foo