Skip to content
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

[new release] js_of_ocaml (7 packages) (5.5.0) #24883

Closed
wants to merge 1 commit into from

Conversation

hhugo
Copy link
Contributor

@hhugo hhugo commented Dec 1, 2023

Compiler from OCaml bytecode to JavaScript

CHANGES:

Features/Changes

Bug fixes

CHANGES:

## Features/Changes
* Compiler: global dead code elimination (Micah Cantor, ocsigen/js_of_ocaml#1503)
* Compiler: change control-flow compilation strategy (ocsigen/js_of_ocaml#1496)
* Compiler: loop no longer absorb the whole continuation
* Compiler: Dead code elimination of unused references (ocsigen/js_of_ocaml#2076)
* Compiler: reduce memory consumption (ocsigen/js_of_ocaml#1516)
* Compiler: support for import and export construct in the js parser/printer
* Lib: add download attribute to anchor element
* Misc: switch CI to OCaml 5.1
* Misc: preliminary support for OCaml 5.2
* Misc: support for OCaml 5.1.1

## Bug fixes
* Runtime: fix Dom_html.onIE (ocsigen/js_of_ocaml#1493)
* Runtime: add conversion functions + strict equality for compatibility with Wasm_of_ocaml (ocsigen/js_of_ocaml#1492)
* Runtime: Dynlink should be able to find symbols in jsoo_runtime ocsigen/js_of_ocaml#1517
* Runtime: fix Unix.lstat, Unix.LargeFile.lstat (ocsigen/js_of_ocaml#1519)
* Compiler: fix global flow analysis (ocsigen/js_of_ocaml#1494)
* Compiler: fix js parser/printer wrt async functions (ocsigen/js_of_ocaml#1515)
* Compiler: fix free variables pass wrt parameters' default value (ocsigen/js_of_ocaml#1521)
* Compiler: fix free variables for classes
* Compiler: fix internal invariant (continuation)
* Compiler: fix variable renaming for let, const and classes
* Lib: Url.Current.set_fragment need not any urlencode (ocsigen/js_of_ocaml#1497)
@haochenx
Copy link
Collaborator

haochenx commented Dec 3, 2023

It seems that there are this release breaks the following packages which were building fine with js_of_ocaml.5.4.0 for similar reasons. Please confirm if those are expected and if they are, we probably want to add upper bounds to these affected packages.

examples:

#=== ERROR while compiling eliom.10.0.0 =======================================#
[..]
# File "src/lib/eliom_client.client.ml", line 596, characters 42-57:
# Error: This expression has type Js_of_ocaml.Js.number_t
#        but an expression was expected of type float
# Command exited with code 2.
# make: *** [Makefile:14: native] Error 10
#=== ERROR while compiling vg.0.9.4 ===========================================#
[..]
# File "src/vgr_htmlc.ml", line 18, characters 26-39:
# 18 |   method lineDashOffset : Js.float_prop
#                                ^^^^^^^^^^^^^
# Alert deprecated: Js_of_ocaml.Js.float_prop
# [since 2.0].
# File "src/vgr_htmlc.ml", line 105, characters 20-81:
# 105 |         let g = P2.(s.ctx ## (createLinearGradient (x pt) (y pt) (x pt') (y pt'))) in
#                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: This expression has type
#          Js_of_ocaml__.Js.number_t ->
#          Js_of_ocaml__.Js.number_t ->
#          Js_of_ocaml__.Js.number_t ->
#          Js_of_ocaml__.Js.number_t ->
#          Js_of_ocaml.Dom_html.canvasGradient Js_of_ocaml__.Js.t
#          Js_of_ocaml__.Js.meth
#        but an expression was expected of type
#          float -> float -> float -> float -> 'res Js_of_ocaml.Js.meth
#        Type Js_of_ocaml__.Js.number_t = Js_of_ocaml.Js.number_t
#        is not compatible with type float 
# Command exited with code 2.
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-tag' 'debug'
#      '-build-dir' '_build' 'opam' 'pkg/META' 'CHANGES.md' 'LICENSE.md'
#      'README.md' 'src/vg.a' 'src/vg.cmxs' 'src/vg.cmxa' 'src/vg.cma'
#      'src/vg.cmx' 'src/vg.cmi' 'src/vg.mli' 'src/vgr_svg.a'
#      'src/vgr_svg.cmxs' 'src/vgr_svg.cmxa' 'src/vgr_svg.cma'
#      'src/vgr_svg.cmx' 'src/vgr_svg.cmi' 'src/vgr_svg.mli' 'src/vgr_pdf.a'
#      'src/vgr_pdf.cmxs' 'src/vgr_pdf.cmxa' 'src/vgr_pdf.cma'
#      'src/vgr_pdf.cmx' 'src/vgr_pdf.cmi' 'src/vgr_pdf.mli' 'src/vgr_htmlc.a'
#      'src/vgr_htmlc.cmxs' 'src/vgr_htmlc.cmxa' 'src/vgr_htmlc.cma'
#      'src/vgr_htmlc.cmx' 'src/vgr_htmlc.cmi' 'src/vgr_htmlc.mli'
#      'test/vecho.native' 'doc/index.mld' 'test/examples.ml'
#      'test/min_htmlc.html' 'test/min_htmlc.ml' 'test/min_pdf.ml'
#      'test/min_svg.ml' 'test/min_cairo_png.ml' 'test/min_cairo_mem.ml'
#      'test/fglyphs.ml' 'test/vecho.ml']: exited with 10
#=== ERROR while compiling ojs_base.0.7.0 =====================================#
# context              2.2.0~alpha4~dev | linux/x86_64 | ocaml-base-compiler.5.1.0 | file:///home/opam/opam-repository
# path                 ~/.opam/5.1/.opam-switch/build/ojs_base.0.7.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ojs_base -j 71 --promote-install-files=false @install
# exit-code            1
# env-file             ~/.opam/log/ojs_base-7-934b46.env
# output-file          ~/.opam/log/ojs_base-7-934b46.out
### output ###
# (cd _build/default && /home/opam/.opam/5.1/bin/ocamlc.opt -g -w -40 -bin-annot -w -6-7-9-10-27-32-33-34-35-36-50-52 -no-strict-sequence -g -bin-annot -I lib_js/.ojs_base_js.objs/byte -I /home/opam/.opam/5.1/lib/js_of_ocaml -I /home/opam/.opam/5.1/lib/js_of_ocaml-compiler/runtime -I /home/opam/.opam/5.1/lib/seq -I /home/opam/.opam/5.1/lib/yojson -intf-suffix .ml -no-alias-deps -o lib_js/.ojs_base_js.objs/byte/ojs_js.cmo -c -impl lib_js/ojs_js.pp.ml)
# File "lib_js/ojs_js.ml", line 159, characters 11-38:
# 159 |     ignore(Dom_html.window##setTimeout
#                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: This expression has type
#          (unit -> unit) Js_of_ocaml__.Js.callback ->
#          Js_of_ocaml__.Js.number_t ->
#          Js_of_ocaml.Dom_html.timeout_id Js_of_ocaml__.Js.meth
#        but an expression was expected of type
#          (unit, unit -> unit) Js_of_ocaml.Js.meth_callback ->
#          float -> 'res Js_of_ocaml.Js.meth
#        Type Js_of_ocaml__.Js.number_t = Js_of_ocaml.Js.number_t
#        is not compatible with type float
# (cd _build/default && /home/opam/.opam/5.1/bin/ocamlopt.opt -g -w -40 -bin-annot -w -6-7-9-10-27-32-33-34-35-36-50-52 -no-strict-sequence -g -I lib_js/.ojs_base_js.objs/byte -I lib_js/.ojs_base_js.objs/native -I /home/opam/.opam/5.1/lib/js_of_ocaml -I /home/opam/.opam/5.1/lib/js_of_ocaml-compiler/runtime -I /home/opam/.opam/5.1/lib/seq -I /home/opam/.opam/5.1/lib/yojson -intf-suffix .ml -no-alias-deps -o lib_js/.ojs_base_js.objs/native/ojs_js.cmx -c -impl lib_js/ojs_js.pp.ml)
# File "lib_js/ojs_js.ml", line 159, characters 11-38:
# 159 |     ignore(Dom_html.window##setTimeout
#                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: This expression has type
#          (unit -> unit) Js_of_ocaml__.Js.callback ->
#          Js_of_ocaml__.Js.number_t ->
#          Js_of_ocaml.Dom_html.timeout_id Js_of_ocaml__.Js.meth
#        but an expression was expected of type
#          (unit, unit -> unit) Js_of_ocaml.Js.meth_callback ->
#          float -> 'res Js_of_ocaml.Js.meth
#        Type Js_of_ocaml__.Js.number_t = Js_of_ocaml.Js.number_t
#        is not compatible with type float

@hhugo
Copy link
Contributor Author

hhugo commented Dec 4, 2023

replaced by #24888

@haochenx
Copy link
Collaborator

haochenx commented Dec 5, 2023

thanks!

@hhugo hhugo deleted the release-js_of_ocaml-5.5.0 branch December 5, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants