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] melange (4.0.0) #25885

Merged
merged 1 commit into from
May 21, 2024

Conversation

anmonteiro
Copy link
Contributor

Toolchain to produce JS from Reason/OCaml

Project page: https://github.com/melange-re/melange

This release includes a version for each of the following OCaml compiler versions: 4.14, 5.1 and the freshly released 5.2.

@mseri
Copy link
Member

mseri commented May 16, 2024

Can you have a look at the failures in the tests?

packages/melange/melange.4.0.0-51/opam Outdated Show resolved Hide resolved
packages/melange/melange.4.0.0-52/opam Outdated Show resolved Hide resolved
@mseri
Copy link
Member

mseri commented May 16, 2024


#=== ERROR while compiling melange.4.0.0-51 ===================================#
# context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.5.1.1 | pinned(https://github.com/melange-re/melange/releases/download/4.0.0-51/melange-4.0.0-51.tbz)
# path                 ~/.opam/5.1/.opam-switch/build/melange.4.0.0-51
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p melange -j 39 @install
# exit-code            1
# env-file             ~/.opam/log/melange-7-ff75da.env
# output-file          ~/.opam/log/melange-7-ff75da.out
### output ###
# (cd _build/default/jscomp/core && /usr/bin/bash -e -u -o pipefail -c 'echo let version = \"$(git rev-parse --verify HEAD)\"') > _build/default/jscomp/core/git_commit.ml
# fatal: not a git repository (or any parent up to mount point /)
# Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
# (cd _build/default/jscomp/core && /usr/bin/bash -e -u -o pipefail -c 'echo let short_version = \"$(git rev-parse --short HEAD)\"') > _build/default/jscomp/core/git_commit.ml
# fatal: not a git repository (or any parent up to mount point /)
# Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
# (cd _build/default && bin/melc.exe -w -40 -open Melange_mini_stdlib -mel-no-check-div-by-zero -mel-cross-module-opt -unsafe -bin-annot -I jscomp/runtime/.js.objs/melange -I jscomp/runtime/.melange_mini_stdlib.objs/melange -intf-suffix .ml --bs-stop-after-cmj --bs-package-output . --bs-module-name js_json --bs-package-name melange.js -no-alias-deps -open Js -nopervasives -nostdlib -o jscomp/runtime/.js.objs/melange/js__Js_json.cmj -c -impl jscomp/runtime/js_json.pp.ml)
# File "jscomp/runtime/js_json.ml", line 52, characters 10-26:
# 52 |   else if Js.Array.isArray x then JSONArray (Obj.magic x)
#                ^^^^^^^^^^^^^^^^
# Error: The module Js.Array is an alias for module Js__Js_array, which is missing
# (cd _build/default && bin/melc.exe -w -40 -open Melange_mini_stdlib -mel-no-check-div-by-zero -mel-cross-module-opt -unsafe -bin-annot -I jscomp/runtime/.js.objs/melange -I jscomp/runtime/.melange_mini_stdlib.objs/melange -intf-suffix .ml --bs-stop-after-cmj --bs-package-output . --bs-module-name js_dict --bs-package-name melange.js -no-alias-deps -open Js -nopervasives -nostdlib -o jscomp/runtime/.js.objs/melange/js__Js_dict.cmj -c -impl jscomp/runtime/js_dict.pp.ml)
# File "jscomp/runtime/js_dict.ml", line 68, characters 10-25:
# 68 |   let l = Js.Array.length keys in
#                ^^^^^^^^^^^^^^^
# Error: The module Js.Array is an alias for module Js__Js_array, which is missing

@mseri
Copy link
Member

mseri commented May 16, 2024

We also would need a conf-tree, which we don't have right now. Any chance that these tests can be disabled for the release?

# --- a/_build/.sandbox/1f2703a419ab24b8ad2fff7372d7642e/default/test/blackbox-tests/shadow-internal-module.t/run.t
# +++ b/_build/.sandbox/1f2703a419ab24b8ad2fff7372d7642e/default/test/blackbox-tests/shadow-internal-module.t/run.t.corrected
# @@ -19,10 +19,8 @@ In this case, we create a library that shadows the `Node` module.
#  Generated JS files are unmangled
#  
#    $ tree --noreport _build/default/dist/node
# -  _build/default/dist/node
# -  |-- node.js
# -  |-- node__.js
# -  `-- other.js
# +  tree: not found
# +  [127]

@anmonteiro
Copy link
Contributor Author

@mseri thanks for the fixes but I’d rather disable running the tests instead.

"@doc" {with-doc}
]
]
available: arch != "x86_32" & arch != "arm32"
Copy link
Member

Choose a reason for hiding this comment

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

@anmonteiro no problem in disabling the tests but please port this fix upstream

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a bit annoying since available isn't supported in the dune-project file and we'll have to track a melange.opam.template...

@mseri
Copy link
Member

mseri commented May 17, 2024

Are these build errors expected?


#=== ERROR while compiling melange.4.0.0-52 ===================================#
# context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.5.2.0 | pinned(https://github.com/melange-re/melange/releases/download/4.0.0-52/melange-4.0.0-52.tbz)
# path                 ~/.opam/5.2/.opam-switch/build/melange.4.0.0-52
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p melange -j 39 @install
# exit-code            1
# env-file             ~/.opam/log/melange-7-0f3e1d.env
# output-file          ~/.opam/log/melange-7-0f3e1d.out
### output ###
# (cd _build/default/jscomp/core && /usr/bin/bash -e -u -o pipefail -c 'echo let version = \"$(git rev-parse --verify HEAD)\"') > _build/default/jscomp/core/git_commit.ml
# fatal: not a git repository (or any parent up to mount point /)
# Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
# (cd _build/default/jscomp/core && /usr/bin/bash -e -u -o pipefail -c 'echo let short_version = \"$(git rev-parse --short HEAD)\"') > _build/default/jscomp/core/git_commit.ml
# fatal: not a git repository (or any parent up to mount point /)
# Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
# (cd _build/default && bin/melc.exe -w -40 -open Melange_mini_stdlib -mel-no-check-div-by-zero -mel-cross-module-opt -unsafe -bin-annot -I jscomp/runtime/.js.objs/melange -I jscomp/runtime/.melange_mini_stdlib.objs/melange -intf-suffix .ml --bs-stop-after-cmj --bs-package-output . --bs-module-name js_dict --bs-package-name melange.js -no-alias-deps -open Js -nopervasives -nostdlib -o jscomp/runtime/.js.objs/melange/js__Js_dict.cmj -c -impl jscomp/runtime/js_dict.pp.ml)
# File "jscomp/runtime/js_dict.ml", line 68, characters 10-25:
# 68 |   let l = Js.Array.length keys in
#                ^^^^^^^^^^^^^^^
# Error: The module Js.Array is an alias for module Js__Js_array, which is missing
# (cd _build/default && bin/melc.exe -w -40 -open Melange_mini_stdlib -mel-no-check-div-by-zero -mel-cross-module-opt -unsafe -bin-annot -I jscomp/runtime/.js.objs/melange -I jscomp/runtime/.melange_mini_stdlib.objs/melange -intf-suffix .ml --bs-stop-after-cmj --bs-package-output . --bs-module-name js_json --bs-package-name melange.js -no-alias-deps -open Js -nopervasives -nostdlib -o jscomp/runtime/.js.objs/melange/js__Js_json.cmj -c -impl jscomp/runtime/js_json.pp.ml)
# File "jscomp/runtime/js_json.ml", line 52, characters 10-26:
# 52 |   else if Js.Array.isArray x then JSONArray (Obj.magic x)
#                ^^^^^^^^^^^^^^^^
# Error: The module Js.Array is an alias for module Js__Js_array, which is missing

and

#=== ERROR while compiling melange.4.0.0-52 ===================================#
# context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.5.1.1 | pinned(https://github.com/melange-re/melange/releases/download/4.0.0-52/melange-4.0.0-52.tbz)
# path                 ~/.opam/5.1/.opam-switch/build/melange.4.0.0-52
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p melange -j 255 @install
# exit-code            1
# env-file             ~/.opam/log/melange-7-e66a72.env
# output-file          ~/.opam/log/melange-7-e66a72.out
### output ###
# File "vendor/dune", line 44, characters 4-56:
# 44 |     annot
# 45 |     (:include ../gen/optional_5_2_modules.txt)))))
# Error: The following modules must be listed here as they don't have an
# implementation:
# - Value_rec_types

They keep appearing every now and then

@anmonteiro
Copy link
Contributor Author

The first one seems like a legitimate failure. a bit annoying since it doesn't happen in our CI.

The 2nd one was a missed lower bound on OCaml 5.2

@anmonteiro
Copy link
Contributor Author

not sure why CI is still building 32-bit versions given the available: .. contraint

@anmonteiro anmonteiro force-pushed the anmonteiro/release-melange-v4 branch from 303fd15 to 797478c Compare May 21, 2024 01:19
@anmonteiro
Copy link
Contributor Author

OK I think this finally looks good. Thanks for your help @mseri.

The failures in CI seem to be solver timeouts.

@mseri mseri merged commit c02a8b3 into ocaml:master May 21, 2024
1 of 2 checks passed
@mseri
Copy link
Member

mseri commented May 21, 2024

Thanks!

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.

None yet

3 participants