Skip to content

[new release] js_of_ocaml (8 packages) (6.3.0)#29348

Merged
jmid merged 2 commits intoocaml:masterfrom
hhugo:release-js_of_ocaml-6.3.0
Feb 18, 2026
Merged

[new release] js_of_ocaml (8 packages) (6.3.0)#29348
jmid merged 2 commits intoocaml:masterfrom
hhugo:release-js_of_ocaml-6.3.0

Conversation

@hhugo
Copy link
Copy Markdown
Contributor

@hhugo hhugo commented Feb 6, 2026

Compiler from OCaml bytecode to JavaScript

CHANGES:

Features/Changes

Bug fixes

CHANGES:

## Features/Changes
* Misc: install shell completion script generated by cmdliner (ocsigen/js_of_ocaml#2140)
* Compiler/wasm: omit code pointer from closures when not used (ocsigen/js_of_ocaml#2059, ocsigen/js_of_ocaml#2093)
* Compiler/wasm: number unboxing (ocsigen/js_of_ocaml#2069, ocsigen/js_of_ocaml#2101)
* Compiler/wasm: specialization of number comparisons and bigarray operations (ocsigen/js_of_ocaml#1954)
* Compiler/wasm: make the type of some Wasm primitives more precise (ocsigen/js_of_ocaml#2100)
* Compiler: reference unboxing (ocsigen/js_of_ocaml#1958)
* Compiler: js-parser: support import/export with attributes
* Compiler: js-parser: support 'using X = E' for resource management (ocsigen/js_of_ocaml#2143)
* Compiler: js-parser: support decorators
* Compiler: js-parser: support html-comments
* Compiler: avoid unnecessary boolean-to-integer conversions (ocsigen/js_of_ocaml#2168)
* Runtime: improved handling of NaNs (ocsigen/js_of_ocaml#2110)
* Lib: allow to reference values from the runtime (ocsigen/js_of_ocaml#2086)
* Lib: add `Dom_html.onload` for WASM-safe load handling (ocsigen/js_of_ocaml#1948)
* Runtime: make eval functions more robust (ocsigen/js_of_ocaml#2108)
* Compiler: added a constant sinking pass (ocsigen/js_of_ocaml#2167)

## Bug fixes
* Compiler: fix `Global_flow.do_escape` monotonicity
* Compiler: fix static eval of `caml_nativeint_to_int`
* Compiler: remove invalid conditional simplification
* Lib: fix `characterData.substringData` method name typo in Dom module
* Lib: fix various Dom_html bindings (submitEvent, mediaQueryListEvent, pointerEvent, element, inputElement, tableElement types and deprecations)
* Lib: fix `numberList` type in Dom_svg to use `number_t`
* Lib: fix `eventSource.url` type to use `js_string t`
* Lib: fix `file.lastModifiedDate` type to use `Js.date t`, add `lastModified`
* Lib: fix `Form.get_form_elements` infinite loop bug
* Lib: fix `position.timestamp` type in Geolocation module
* Lib: remove non-existent `setDay` and `setUTCDay` methods from `Js.date`
* Lib: fix `_ACTIVE_TEXTURE_` type in WebGL to use `textureUnit`
* Compiler: fix purity of comparison functions (again) (ocsigen/js_of_ocaml#2092)
* Compiler: fix inlining (ocsigen/js_of_ocaml#2107)
* Compiler: allow arrow functions in for loops
* Ppx: disable spurious warning for unused "self" in object literal (ocsigen/js_of_ocaml#2128)
* Ppx: fix labelled arguments for methods (ocsigen/js_of_ocaml#2126)
* Runtime/wasm: fix Unix.times (ocsigen/js_of_ocaml#2096)
* Runtime: runtime with target-env=browser should not rely on "require(..)" (ocsigen/js_of_ocaml#2129)
* Runtime: fix fake filesystem with path containing special regexp chars. (ocsigen/js_of_ocaml#2132)
* Runtime/wasm: fix unmarshalling of compressed data (ocsigen/js_of_ocaml#2141)
* Runtime: fix compilation of loops at start of exception handlers (ocsigen/js_of_ocaml#2151)
* Compiler: fix parallel renaming (ocsigen/js_of_ocaml#2156)
@mseri
Copy link
Copy Markdown
Member

mseri commented Feb 12, 2026

There are some failures that we should check, I don't remember them from the past:

#=== ERROR while compiling timmy-lwt.1.1.5 ====================================#
# context              2.5.0 | linux/x86_64 | ocaml-base-compiler.4.14.2 | file:///home/opam/opam-repository
# path                 ~/.opam/4.14/.opam-switch/build/timmy-lwt.1.1.5
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p timmy-lwt -j 71 @install
# exit-code            1
# env-file             ~/.opam/log/timmy-lwt-7-10f672.env
# output-file          ~/.opam/log/timmy-lwt-7-10f672.out
### output ###
# (cd _build/default && /home/opam/.opam/4.14/bin/ocamlc.opt -w -40 -g -bin-annot -I timmy-lwt/virtual/.timmy_lwt_virtual.objs/byte -I /home/opam/.opam/4.14/lib/base -I /home/opam/.opam/4.14/lib/base/base_internalhash_types -I /home/opam/.opam/4.14/lib/base/caml -I /home/opam/.opam/4.14/lib/base/shadow_stdlib -I /home/opam/.opam/4.14/lib/bytes -I /home/opam/.opam/4.14/lib/fmt -I /home/opam/.opam/4.14/lib/js_of_ocaml -I /home/opam/.opam/4.14/lib/js_of_ocaml-compiler/runtime -I /home/opam/.opam/4.14/lib/logs -I /home/opam/.opam/4.14/lib/lwt -I /home/opam/.opam/4.14/lib/lwt/unix -I /home/opam/.opam/4.14/lib/ocaml/threads -I /home/opam/.opam/4.14/lib/ocplib-endian -I /home/opam/.opam/4.14/lib/ocplib-endian/bigstring -I /home/opam/.opam/4.14/lib/ppx_deriving/runtime -I /home/opam/.opam/4.14/lib/ppx_here/runtime-lib -I /home/opam/.opam/4.14/lib/ptime -I /home/opam/.opam/4.14/lib/sexplib0 -I /home/opam/.opam/4.14/lib/timmy -I /home/opam/.opam/4.14/lib/timmy/clock -I /home/opam/.opam/4.14/lib/timmy/clock-virtual -I /home/opam/.opam/4.14/lib/timmy/clock/virtual -I timmy-lwt/lib/.timmy_lwt.objs/byte -I timmy-lwt/platform/.timmy_lwt_platform.objs/byte -intf-suffix .ml -no-alias-deps -o timmy-lwt/virtual/.timmy_lwt_virtual.objs/byte/timmy_lwt_virtual.cmo -c -impl timmy-lwt/virtual/src/timmy_lwt_virtual.pp.ml)
# File "timmy-lwt/virtual/src/timmy_lwt_virtual.ml", lines 8-46, characters 4-7:
#  8 | ....object (self)
#  9 |       inherit Lwt_engine.abstract
# 10 | 
# 11 |       method register_writable fd f =
# 12 |         let event = actual#on_writable fd (fun _ -> f ()) in
# ...
# 43 |                      f ()))
# 44 |           in
# 45 |           Lazy.force stop
# 46 |     end
# Error: This object has virtual methods.
#        The following methods are virtual : id
# (cd _build/default && /home/opam/.opam/4.14/bin/ocamlopt.opt -w -40 -g -I timmy-lwt/virtual/.timmy_lwt_virtual.objs/byte -I timmy-lwt/virtual/.timmy_lwt_virtual.objs/native -I /home/opam/.opam/4.14/lib/base -I /home/opam/.opam/4.14/lib/base/base_internalhash_types -I /home/opam/.opam/4.14/lib/base/caml -I /home/opam/.opam/4.14/lib/base/shadow_stdlib -I /home/opam/.opam/4.14/lib/bytes -I /home/opam/.opam/4.14/lib/fmt -I /home/opam/.opam/4.14/lib/js_of_ocaml -I /home/opam/.opam/4.14/lib/js_of_ocaml-compiler/runtime -I /home/opam/.opam/4.14/lib/logs -I /home/opam/.opam/4.14/lib/lwt -I /home/opam/.opam/4.14/lib/lwt/unix -I /home/opam/.opam/4.14/lib/ocaml/threads -I /home/opam/.opam/4.14/lib/ocplib-endian -I /home/opam/.opam/4.14/lib/ocplib-endian/bigstring -I /home/opam/.opam/4.14/lib/ppx_deriving/runtime -I /home/opam/.opam/4.14/lib/ppx_here/runtime-lib -I /home/opam/.opam/4.14/lib/ptime -I /home/opam/.opam/4.14/lib/sexplib0 -I /home/opam/.opam/4.14/lib/timmy -I /home/opam/.opam/4.14/lib/timmy/clock -I /home/opam/.opam/4.14/lib/timmy/clock-virtual -I /home/opam/.opam/4.14/lib/timmy/clock/virtual -I timmy-lwt/lib/.timmy_lwt.objs/byte -I timmy-lwt/lib/.timmy_lwt.objs/native -I timmy-lwt/platform/.timmy_lwt_platform.objs/byte -I timmy-lwt/platform/.timmy_lwt_platform.objs/native -intf-suffix .ml -no-alias-deps -o timmy-lwt/virtual/.timmy_lwt_virtual.objs/native/timmy_lwt_virtual.cmx -c -impl timmy-lwt/virtual/src/timmy_lwt_virtual.pp.ml)
# File "timmy-lwt/virtual/src/timmy_lwt_virtual.ml", lines 8-46, characters 4-7:
#  8 | ....object (self)
#  9 |       inherit Lwt_engine.abstract
# 10 | 
# 11 |       method register_writable fd f =
# 12 |         let event = actual#on_writable fd (fun _ -> f ()) in
# ...
# 43 |                      f ()))
# 44 |           in
# 45 |           Lazy.force stop
# 46 |     end
# Error: This object has virtual methods.
#        The following methods are virtual : id
#=== ERROR while compiling data-encoding.0.5 ==================================#
# context              2.5.0 | linux/x86_64 | ocaml-base-compiler.5.4.0 | file:///home/opam/opam-repository
# path                 ~/.opam/5.4/.opam-switch/build/data-encoding.0.5
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune runtest -p data-encoding -j 71
# exit-code            1
# env-file             ~/.opam/log/data-encoding-7-69919d.env
# output-file          ~/.opam/log/data-encoding-7-69919d.out
### output ###
# File "test/dune", line 3, characters 43-58:
# 3 |    test_json_stream_sizes test_classifiers test_sub_string
#                                                ^^^^^^^^^^^^^^^
# (cd _build/default/test && ./test_sub_string.exe)
# Fatal error: exception File "test/test_sub_string.ml", line 35, characters 2-8: Assertion failed
# File "test/dune", line 4, characters 3-27:
# 4 |    json_roundtrip_in_binary)
#        ^^^^^^^^^^^^^^^^^^^^^^^^
# (cd _build/default/test && ./json_roundtrip_in_binary.exe)
# json_json_roundtrip: FAIL
# 
# When given the input:
# 
#     <float>
#     
# the test threw an exception:
# 
#     File "test/json_roundtrip_in_binary.ml", line 92, characters 2-8: Assertion failed
#     Raised at Dune__exe__Json_roundtrip_in_binary.test_json in file "test/json_roundtrip_in_binary.ml", line 92, characters 2-17
#     Called from Crowbar.gen_apply.go.(fun) in file "src/crowbar.ml", line 352, characters 16-19
#     
# json_binary(bson)_roundtrip: FAIL
# 
# When given the input:
# 
#     <float>
#     
# the test threw an exception:
# 
#     File "test/json_roundtrip_in_binary.ml", line 116, characters 28-34: Assertion failed
#     Raised at Dune__exe__Json_roundtrip_in_binary.test_binary.assert_equal in file "test/json_roundtrip_in_binary.ml", line 116, characters 28-42
#     Called from Crowbar.gen_apply.go.(fun) in file "src/crowbar.ml", line 352, characters 16-19
#=== ERROR while compiling data-encoding.1.0.1 ================================#
# context              2.5.0 | linux/x86_64 | ocaml-base-compiler.5.4.0 | file:///home/opam/opam-repository
# path                 ~/.opam/5.4/.opam-switch/build/data-encoding.1.0.1
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune runtest -p data-encoding -j 71
# exit-code            1
# env-file             ~/.opam/log/data-encoding-7-8a4fb8.env
# output-file          ~/.opam/log/data-encoding-7-8a4fb8.out
### output ###
# (cd _build/default/test/pbt && ./test_json_stream_sizes.exe)
# blitting with a lot of string boundaries: PASS
# 
# string-seq with a lot of string boundaries: PASS
# 
# File "test/pbt/dune", lines 47-51, characters 0-104:
# 47 | (rule
# 48 |  (alias runtest)
# 49 |  (package data-encoding)
# 50 |  (action
# 51 |   (run %{dep:./json_roundtrip_in_binary.exe})))
# (cd _build/default/test/pbt && ./json_roundtrip_in_binary.exe)
# json_json_roundtrip: FAIL
# 
# When given the input:
# 
#     <float>
#     
# the test threw an exception:
# 
#     File "test/pbt/json_roundtrip_in_binary.ml", line 92, characters 2-8: Assertion failed
#     Raised at Dune__exe__Json_roundtrip_in_binary.test_json in file "test/pbt/json_roundtrip_in_binary.ml", line 92, characters 2-17
#     Called from Crowbar.gen_apply.go.(fun) in file "src/crowbar.ml", line 352, characters 16-19
#     
# json_binary(bson)_roundtrip: FAIL
# 
# When given the input:
# 
#     <float>
#     
# the test threw an exception:
# 
#     File "test/pbt/json_roundtrip_in_binary.ml", line 116, characters 28-34: Assertion failed
#     Raised at Dune__exe__Json_roundtrip_in_binary.test_binary.assert_equal in file "test/pbt/json_roundtrip_in_binary.ml", line 116, characters 28-42
#     Called from Crowbar.gen_apply.go.(fun) in file "src/crowbar.ml", line 352, characters 16-19

@hhugo
Copy link
Copy Markdown
Contributor Author

hhugo commented Feb 12, 2026

I'm also not sure if I should fix ocsigen/js_of_ocaml#2181 before the release

@hhugo
Copy link
Copy Markdown
Contributor Author

hhugo commented Feb 13, 2026

I tsuspect that the timmy-lwt error is due to a recent version of lwt.

@avsm
Copy link
Copy Markdown
Member

avsm commented Feb 13, 2026

@hhugo that would be helpful - I use js-of-ocaml all the time in a monorepo

@hhugo
Copy link
Copy Markdown
Contributor Author

hhugo commented Feb 13, 2026

The data-encoding errors are unrelated. Tests fail both in native and Js. The test wrongly use = to check equality on a data structure that contains float. The tests should probably use compare a b = 0 to have compare nan nan = 0

@hhugo
Copy link
Copy Markdown
Contributor Author

hhugo commented Feb 13, 2026

@avsm, I've opened #29388 for jsoo with the monorepo fix.

I think I also this version 6.3.0 to be merged because I'm not convinced my fix in 6.3.1 will play well with future release of cmdliner.

@hhugo
Copy link
Copy Markdown
Contributor Author

hhugo commented Feb 13, 2026

The data-encoding issue is not new, it was spotted in #28907

@hhugo
Copy link
Copy Markdown
Contributor Author

hhugo commented Feb 13, 2026

I think this is good to go.

@mseri
Copy link
Copy Markdown
Member

mseri commented Feb 14, 2026

I have opened #29390 for timmy-lwt

@jmid
Copy link
Copy Markdown
Member

jmid commented Feb 17, 2026

debian-12, ubuntu-22.04, and ubuntu-24.04 offer binaryen 105 and 108 while >=119 is required
and wasm-merge was added in 113 https://github.com/WebAssembly/binaryen/blob/version_126/CHANGELOG.md
which explains the wasm-merge: not found error on these distributions.
I've therefore added suitable x-ci-accept-failures entries to silence them.

The remaining wasm_of_ocaml failures are on Centos 9, Centos 10, and OpenSuse Leap.
The system package situation there is spotty: https://pkgs.org/download/binaryen

  • Centos 9 has an EPEL package - but it is only binaryen 111 😬
  • OpenSuse Tumbleweed has a package (and indeed it is not failing the CI), while OpenSuse Leap doesn't 🤷

Copy link
Copy Markdown
Member

@jmid jmid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

FTR, CI is failing

  • revdeps (binaryen, frama_c_codex, data-encoding)
  • on platforms missing a system binaryen package (Centos + OpenSuse Leap)
  • opam-2.0 workflows
  • a FreeBSD workflow with an internal file descriptor error

@jmid jmid merged commit e6d308e into ocaml:master Feb 18, 2026
2 of 5 checks passed
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.

5 participants