Skip to content

gen_js_api 1.1.* tests are not compatible with latest js_of_ocaml #28161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mseri
Copy link
Member

@mseri mseri commented Jul 10, 2025

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

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 <marcello.seri@gmail.com>
@mseri
Copy link
Member Author

mseri commented Jul 10, 2025

Seen on #28144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant