From f0a16514e07cc28bbe2521a9163153010aa804ee Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Thu, 10 Jul 2025 15:34:58 +0200 Subject: [PATCH 1/2] gen_js_api 1.1.* tests are not compatible with latest js_of_ocaml Fails with ``` -let (_ : string of_js) = Ojs.string_of_js -let (_ : string to_js) = Ojs.string_to_js -let (_ : int of_js) = Ojs.int_of_js -let (_ : int to_js) = Ojs.int_to_js -let (_ : bool of_js) = Ojs.bool_of_js -let (_ : bool to_js) = Ojs.bool_to_js -let (_ : float of_js) = Ojs.float_of_js -let (_ : float to_js) = Ojs.float_to_js -let (_ : Ojs.t of_js) = fun (x9 : Ojs.t) -> x9 -let (_ : Ojs.t to_js) = fun (x10 : Ojs.t) -> x10 -let (_ : (string * int) of_js) = +let _ = Ojs.string_of_js +let _ = Ojs.string_to_js +let _ = Ojs.int_of_js +let _ = Ojs.int_to_js +let _ = Ojs.bool_of_js +let _ = Ojs.bool_to_js +let _ = Ojs.float_of_js +let _ = Ojs.float_to_js +let _ = fun (x9 : Ojs.t) -> x9 +let _ = fun (x10 : Ojs.t) -> x10 +let _ = fun (x11 : Ojs.t) -> let x12 = x11 in ((Ojs.string_of_js (Ojs.array_get x12 0)), (Ojs.int_of_js (Ojs.array_get x12 1))) -let (_ : (string * int) to_js) = +let _ = fun (x13 : (string * int)) -> let (x14, x15) = x13 in let x16 = Ojs.array_make 2 in Ojs.array_set x16 0 (Ojs.string_to_js x14); Ojs.array_set x16 1 (Ojs.int_to_js x15); x16 ``` Signed-off-by: Marcello Seri --- packages/gen_js_api/gen_js_api.1.1.0/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.1/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.2/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.3/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.4/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.5/opam | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/gen_js_api/gen_js_api.1.1.0/opam b/packages/gen_js_api/gen_js_api.1.1.0/opam index 49577d3f9f26..c989c98048e5 100644 --- a/packages/gen_js_api/gen_js_api.1.1.0/opam +++ b/packages/gen_js_api/gen_js_api.1.1.0/opam @@ -23,7 +23,7 @@ depends: [ "ocaml" {>= "4.08"} "ppxlib" {>= "0.22" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) "ppxlib" {with-test & < "0.26.0"} - "js_of_ocaml-compiler" {with-test} + "js_of_ocaml-compiler" {with-test & < "6.1.1"} "conf-npm" {with-test} "ojs" {= "1.1.0"} "odoc" {with-doc} diff --git a/packages/gen_js_api/gen_js_api.1.1.1/opam b/packages/gen_js_api/gen_js_api.1.1.1/opam index 389cb6ac1775..f8e996a73ee0 100644 --- a/packages/gen_js_api/gen_js_api.1.1.1/opam +++ b/packages/gen_js_api/gen_js_api.1.1.1/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "2.7"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) - "js_of_ocaml-compiler" {with-test} + "js_of_ocaml-compiler" {with-test & < "6.1.1"} "conf-npm" {with-test} "ojs" {= "1.1.1"} "odoc" {with-doc} diff --git a/packages/gen_js_api/gen_js_api.1.1.2/opam b/packages/gen_js_api/gen_js_api.1.1.2/opam index 83a4f08cac12..7d25331e0ef2 100644 --- a/packages/gen_js_api/gen_js_api.1.1.2/opam +++ b/packages/gen_js_api/gen_js_api.1.1.2/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "2.7"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) - "js_of_ocaml-compiler" {with-test} + "js_of_ocaml-compiler" {with-test & < "6.1.1"} "conf-npm" {with-test} "ojs" {= version} "odoc" {with-doc} diff --git a/packages/gen_js_api/gen_js_api.1.1.3/opam b/packages/gen_js_api/gen_js_api.1.1.3/opam index 12cf47ca3332..4cbcc9b1ba51 100644 --- a/packages/gen_js_api/gen_js_api.1.1.3/opam +++ b/packages/gen_js_api/gen_js_api.1.1.3/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "2.7"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) - "js_of_ocaml-compiler" {with-test} + "js_of_ocaml-compiler" {with-test & < "6.1.1"} "conf-npm" {with-test} "ojs" {= version} "odoc" {with-doc} diff --git a/packages/gen_js_api/gen_js_api.1.1.4/opam b/packages/gen_js_api/gen_js_api.1.1.4/opam index 7f427d2f45bb..e71927646f16 100644 --- a/packages/gen_js_api/gen_js_api.1.1.4/opam +++ b/packages/gen_js_api/gen_js_api.1.1.4/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "3.0"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) - "js_of_ocaml-compiler" {with-test} + "js_of_ocaml-compiler" {with-test & < "6.1.1"} "ojs" {= version} "odoc" {with-doc} ] diff --git a/packages/gen_js_api/gen_js_api.1.1.5/opam b/packages/gen_js_api/gen_js_api.1.1.5/opam index 7cb4f0f3486d..6fdb5a63a0c4 100644 --- a/packages/gen_js_api/gen_js_api.1.1.5/opam +++ b/packages/gen_js_api/gen_js_api.1.1.5/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "3.0"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26"} - "js_of_ocaml-compiler" {with-test} + "js_of_ocaml-compiler" {with-test & < "6.1.1"} "ojs" {= version} "odoc" {with-doc} ] From 9e41ac27483e663a1b4e36d1bf4f10c9604f1cfc Mon Sep 17 00:00:00 2001 From: Marcello Seri Date: Mon, 14 Jul 2025 14:32:03 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- packages/gen_js_api/gen_js_api.1.1.0/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.1/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.2/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.3/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.4/opam | 2 +- packages/gen_js_api/gen_js_api.1.1.5/opam | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/gen_js_api/gen_js_api.1.1.0/opam b/packages/gen_js_api/gen_js_api.1.1.0/opam index c989c98048e5..49e8453b0d43 100644 --- a/packages/gen_js_api/gen_js_api.1.1.0/opam +++ b/packages/gen_js_api/gen_js_api.1.1.0/opam @@ -23,7 +23,7 @@ depends: [ "ocaml" {>= "4.08"} "ppxlib" {>= "0.22" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) "ppxlib" {with-test & < "0.26.0"} - "js_of_ocaml-compiler" {with-test & < "6.1.1"} + "js_of_ocaml-compiler" {with-test & < "6.0"} "conf-npm" {with-test} "ojs" {= "1.1.0"} "odoc" {with-doc} diff --git a/packages/gen_js_api/gen_js_api.1.1.1/opam b/packages/gen_js_api/gen_js_api.1.1.1/opam index f8e996a73ee0..b2510168b80d 100644 --- a/packages/gen_js_api/gen_js_api.1.1.1/opam +++ b/packages/gen_js_api/gen_js_api.1.1.1/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "2.7"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) - "js_of_ocaml-compiler" {with-test & < "6.1.1"} + "js_of_ocaml-compiler" {with-test & < "6.0"} "conf-npm" {with-test} "ojs" {= "1.1.1"} "odoc" {with-doc} diff --git a/packages/gen_js_api/gen_js_api.1.1.2/opam b/packages/gen_js_api/gen_js_api.1.1.2/opam index 7d25331e0ef2..bfd020fa9b28 100644 --- a/packages/gen_js_api/gen_js_api.1.1.2/opam +++ b/packages/gen_js_api/gen_js_api.1.1.2/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "2.7"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) - "js_of_ocaml-compiler" {with-test & < "6.1.1"} + "js_of_ocaml-compiler" {with-test & < "6.0"} "conf-npm" {with-test} "ojs" {= version} "odoc" {with-doc} diff --git a/packages/gen_js_api/gen_js_api.1.1.3/opam b/packages/gen_js_api/gen_js_api.1.1.3/opam index 4cbcc9b1ba51..33362efbf67e 100644 --- a/packages/gen_js_api/gen_js_api.1.1.3/opam +++ b/packages/gen_js_api/gen_js_api.1.1.3/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "2.7"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) - "js_of_ocaml-compiler" {with-test & < "6.1.1"} + "js_of_ocaml-compiler" {with-test & < "6.0"} "conf-npm" {with-test} "ojs" {= version} "odoc" {with-doc} diff --git a/packages/gen_js_api/gen_js_api.1.1.4/opam b/packages/gen_js_api/gen_js_api.1.1.4/opam index e71927646f16..49e941ba3daa 100644 --- a/packages/gen_js_api/gen_js_api.1.1.4/opam +++ b/packages/gen_js_api/gen_js_api.1.1.4/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "3.0"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26" & < "0.36"} | ("ocaml" {< "5.3"} & "ppxlib" {>= "0.36"}) - "js_of_ocaml-compiler" {with-test & < "6.1.1"} + "js_of_ocaml-compiler" {with-test & < "6.0"} "ojs" {= version} "odoc" {with-doc} ] diff --git a/packages/gen_js_api/gen_js_api.1.1.5/opam b/packages/gen_js_api/gen_js_api.1.1.5/opam index 6fdb5a63a0c4..3e14b089bc5c 100644 --- a/packages/gen_js_api/gen_js_api.1.1.5/opam +++ b/packages/gen_js_api/gen_js_api.1.1.5/opam @@ -22,7 +22,7 @@ depends: [ "dune" {>= "3.0"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.26"} - "js_of_ocaml-compiler" {with-test & < "6.1.1"} + "js_of_ocaml-compiler" {with-test & < "6.0"} "ojs" {= version} "odoc" {with-doc} ]