From 4680208d627bc3ca582627d99cd5db75a0cf35f0 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Wed, 20 Nov 2024 17:04:41 +0100 Subject: [PATCH 1/6] CI: move --- .github/workflows/build.yml | 36 +------------------------------ .github/workflows/lint.yml | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 927e38546..0c9afe965 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -154,38 +154,4 @@ jobs: branch: wikidoc folder: doc-dev clean: true - target-folder: doc/dev/ - - lint-opam: - runs-on: ubuntu-latest - steps: - - name: Checkout tree - uses: actions/checkout@v4 - - name: Set-up OCaml - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: "5.2" - dune-cache: true - - uses: ocaml/setup-ocaml/lint-opam@v3 - - lint-fmt: - runs-on: ubuntu-latest - steps: - - name: Checkout tree - uses: actions/checkout@v4 - - name: Set-up OCaml - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: "5.2" - dune-cache: true - - uses: ocaml/setup-ocaml/lint-fmt@v3 - - lint-runtime: - runs-on: ubuntu-latest - steps: - - name: Checkout tree - uses: actions/checkout@v4 - - name: Set-up Biome - uses: biomejs/setup-biome@v2 - - name: Run biome - run: biome ci + target-folder: doc/dev/ \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..e912e7b97 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,42 @@ +name: lint + +on: + pull_request: + push: + branches: + - master + +jobs: + lint-opam: + runs-on: ubuntu-latest + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: "5.2" + dune-cache: true + - uses: ocaml/setup-ocaml/lint-opam@v3 + + lint-fmt: + runs-on: ubuntu-latest + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: "5.2" + dune-cache: true + - uses: ocaml/setup-ocaml/lint-fmt@v3 + + lint-runtime: + runs-on: ubuntu-latest + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up Biome + uses: biomejs/setup-biome@v2 + - name: Run biome + run: biome ci From 8e1b6caf472ca4412ee09a28d6593c71b2d3af8d Mon Sep 17 00:00:00 2001 From: hhugo Date: Fri, 22 Nov 2024 11:28:16 +0100 Subject: [PATCH 2/6] Release 5.9 (#1735) --- CHANGES.md | 4 ++-- VERSION | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 81d9bd1bb..e0d314ad2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,10 +1,11 @@ -# dev +# 5.9.0 (2024-11-22) - Lille ## Features/Changes * Misc: update testsuite to OCaml 5.2 * Misc: CI uses opam.2.2 and no longer use sunset repo * Misc: yojson is no longer optional * Misc: reduce the diff with the wasm_of_ocaml fork +* Misc: finalize support for OCaml 5.3 * Compiler: speedup global_flow/global_deadcode pass on large bytecode * Compiler: improved global dead code elimination (#2206) * Compiler: speedup json parsing, relying on Yojson.Raw (#1640) @@ -28,7 +29,6 @@ * Toplevel: no longer set globals for toplevel initialization * Runtime: precompute constants used in `caml_lxm_next` (#1730) * Runtime: cleanup runtime -* Runtime: add support for OCaml 5.3 ## Bug fixes * Runtime: fix parsing of unsigned integers (0u2147483648) (#1633, #1666) diff --git a/VERSION b/VERSION index 5e21ca5a8..b3d91f9cf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.8.2 +5.9.0 From 22a09457fdb5a673e00d9ee0f984e11d30075ed7 Mon Sep 17 00:00:00 2001 From: hhugo Date: Sat, 23 Nov 2024 10:59:36 +0100 Subject: [PATCH 3/6] Misc: adjust opam constraint (#1742) --- dune-project | 2 +- js_of_ocaml-compiler.opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dune-project b/dune-project index e82c37fec..0407b41f3 100644 --- a/dune-project +++ b/dune-project @@ -29,7 +29,7 @@ menhir menhirLib menhirSdk - yojson) + (yojson (>= 1.6))) (depopts ocamlfind) (conflicts diff --git a/js_of_ocaml-compiler.opam b/js_of_ocaml-compiler.opam index 0a3cf50d9..131e3e5c1 100644 --- a/js_of_ocaml-compiler.opam +++ b/js_of_ocaml-compiler.opam @@ -24,7 +24,7 @@ depends: [ "menhir" "menhirLib" "menhirSdk" - "yojson" + "yojson" {>= "1.6"} "odoc" {with-doc} ] depopts: ["ocamlfind"] From 44ef0bba09266e8d3262c8ae3dda4b3f38b13109 Mon Sep 17 00:00:00 2001 From: hhugo Date: Mon, 25 Nov 2024 15:26:24 +0100 Subject: [PATCH 4/6] Lib: small refactoring around js exception printing (#1743) --- lib/js_of_ocaml/js.ml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/js_of_ocaml/js.ml b/lib/js_of_ocaml/js.ml index e9972add3..9422def2c 100644 --- a/lib/js_of_ocaml/js.ml +++ b/lib/js_of_ocaml/js.ml @@ -812,15 +812,16 @@ let parseFloat (s : js_string t) : number_t = let s = Unsafe.fun_call Unsafe.global##.parseFloat [| Unsafe.inject s |] in if isNaN s then failwith "parseFloat" else s -let _ = - Printexc.register_printer (function - | Js_error.Exn e -> Some (Js_error.to_string e) - | _ -> None) - let _ = Printexc.register_printer (fun e -> - let e : < .. > t = Obj.magic e in - if instanceof e array_constructor then None else Some (to_string e##toString)) + if instanceof (Obj.magic e : < .. > t) error_constr + then + let e = Js_error.of_error (Obj.magic e : error t) in + Some (Js_error.to_string e) + else + match e with + | Js_error.Exn e -> Some (Js_error.to_string e) + | _ -> None) let export_js (field : js_string t) x = Unsafe.set From bbf4c5a0aa880715339fd51f788bc0d57bfd1596 Mon Sep 17 00:00:00 2001 From: hhugo Date: Mon, 25 Nov 2024 15:37:20 +0100 Subject: [PATCH 5/6] Fix ci mac (#1744) --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c9afe965..eeab8020b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,6 +102,7 @@ jobs: run: | brew update brew upgrade + brew unlink pkg-config@0.29.2 brew install pkgconf # work around https://github.com/actions/runner-images/issues/10984 From 7c729ae2ae444e53607290c7f79b74e27b15fb2f Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 26 Nov 2024 14:02:16 +0100 Subject: [PATCH 6/6] Misc: remove macos CI fix --- .github/workflows/build.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eeab8020b..78ee7afaa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,15 +97,6 @@ jobs: # try to install them anyways, so we save an apt-roundtrip. sudo aptitude -o Acquire::Retries=30 install gcc-multilib g++-multilib pkg-config libgmp-dev libgmp-dev:i386 libx11-dev:i386 -y - - name: macos fix - if: runner.os == 'Macos' - run: | - brew update - brew upgrade - brew unlink pkg-config@0.29.2 - brew install pkgconf - # work around https://github.com/actions/runner-images/issues/10984 - - name: Checkout tree uses: actions/checkout@v4