From 77de90163d922935b7b861f42118b177bbd0c873 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 11:50:30 +0100 Subject: [PATCH 01/13] Prepare v0.0.5 --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 3fdb23bb..20043589 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +## v0.0.5 (2024-12-21) Paris - France + +- Support Cosmopolitan 3.1 (#43, @dinosaure) +- Fix the compilation of esperanto with setup-ocaml and GitHub CI (#44, @dinosaure) +- Extend the support of Esperanto to 4.13 (#45, @dinosaure) + ## v0.0.4 (2023-05-25) Paris - France - Fix the compilation of `threads.cmxa` (@dinosaure, #38) From 9a7b6102abe300fd579c79a90b49b2071c9f51d9 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 11:50:48 +0100 Subject: [PATCH 02/13] Upgrade release.sh --- release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.sh b/release.sh index e8422846..75e7fec9 100755 --- a/release.sh +++ b/release.sh @@ -52,7 +52,7 @@ url { } EOM -for PACKAGE in 'esperanto-cosmopolitan' 'esperanto'; do +for PACKAGE in 'esperanto-cosmopolitan' 'x86_64-esperanto' 'aarch64-esperanto'; do PKG_DIR=${OUTPUT_DIR}/packages/${PACKAGE}/${PACKAGE}.${OPAM_VERSION} mkdir -p ${PKG_DIR} || exit 1 cat opam/${PACKAGE}.opam ${OUTPUT_DIR}/tmp/url \ From 5e07b512a32a82341795de8f86177ca18cf49d96 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 12:13:46 +0100 Subject: [PATCH 03/13] Constraint {x86_64,aarch64}-esperanto to use the same version of esperanto-cosmopolitan --- opam/aarch64-esperanto.opam | 2 +- opam/x86_64-esperanto.opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opam/aarch64-esperanto.opam b/opam/aarch64-esperanto.opam index 17924844..4743f4ad 100644 --- a/opam/aarch64-esperanto.opam +++ b/opam/aarch64-esperanto.opam @@ -15,7 +15,7 @@ install: ["sh" "-c" "make -C caml install" ] depends: [ "conf-which" {build} "ocaml-src" {build} - "esperanto-cosmopolitan" {build} + "esperanto-cosmopolitan" {= version & build} "ocaml" {>= "4.13.0" & < "4.15.0"} ] synopsis: "An OCaml compiler with Cosmopolitan" diff --git a/opam/x86_64-esperanto.opam b/opam/x86_64-esperanto.opam index 368a126c..b4b38a8d 100644 --- a/opam/x86_64-esperanto.opam +++ b/opam/x86_64-esperanto.opam @@ -15,7 +15,7 @@ install: ["sh" "-c" "make -C caml install" ] depends: [ "conf-which" {build} "ocaml-src" {build} - "esperanto-cosmopolitan" {build} + "esperanto-cosmopolitan" {= version & build} "ocaml" {>= "4.13.0" & < "4.15.0"} ] synopsis: "An OCaml compiler with Cosmopolitan" From 073b65b5a019663b8e689b01f780fb49a17df108 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 12:18:31 +0100 Subject: [PATCH 04/13] esperanto-cosmopolitan requires OCaml 4.12.0 at least --- opam/esperanto-cosmopolitan.opam | 1 + 1 file changed, 1 insertion(+) diff --git a/opam/esperanto-cosmopolitan.opam b/opam/esperanto-cosmopolitan.opam index 70ba4200..dd480bbe 100644 --- a/opam/esperanto-cosmopolitan.opam +++ b/opam/esperanto-cosmopolitan.opam @@ -13,6 +13,7 @@ install: [ [ make "-C" "toolchain" "PREFIX=%{prefix}%" "install" ] ] depends: [ + "ocaml" {>= "4.12.0"} "dune" "decompress" "checkseum" From bf0bb61999655d9869239c76ad7aee960ccca62c Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 12:26:46 +0100 Subject: [PATCH 05/13] Move the dune-project file to the root of the distribution --- toolchain/dune-project => dune-project | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename toolchain/dune-project => dune-project (100%) diff --git a/toolchain/dune-project b/dune-project similarity index 100% rename from toolchain/dune-project rename to dune-project From f8a8b4c37f6663731c0ef9c9cf52522f5a96be3b Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 12:34:50 +0100 Subject: [PATCH 06/13] esperanto-cosmopolitan requires OCaml 4.13 (due to String.empty) --- opam/esperanto-cosmopolitan.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam/esperanto-cosmopolitan.opam b/opam/esperanto-cosmopolitan.opam index dd480bbe..aab5267b 100644 --- a/opam/esperanto-cosmopolitan.opam +++ b/opam/esperanto-cosmopolitan.opam @@ -13,7 +13,7 @@ install: [ [ make "-C" "toolchain" "PREFIX=%{prefix}%" "install" ] ] depends: [ - "ocaml" {>= "4.12.0"} + "ocaml" {>= "4.13.0"} "dune" "decompress" "checkseum" From 798e91e982456951dd1dcf0186e7da451121c302 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 12:35:38 +0100 Subject: [PATCH 07/13] esperanto-cosmopolitan requires decompress.1.5.3 --- opam/esperanto-cosmopolitan.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam/esperanto-cosmopolitan.opam b/opam/esperanto-cosmopolitan.opam index aab5267b..bc1d0cb5 100644 --- a/opam/esperanto-cosmopolitan.opam +++ b/opam/esperanto-cosmopolitan.opam @@ -15,7 +15,7 @@ install: [ depends: [ "ocaml" {>= "4.13.0"} "dune" - "decompress" + "decompress" {>= "1.5.3"} "checkseum" "digestif" # "conf-binutils" From 1ebc3fd9eb5092e4bf579649d4d09c16e873d63c Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 12:43:51 +0100 Subject: [PATCH 08/13] Fix our CI and how we pin our packages to respect to constraint about versions on packages --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dcf9ac76..8b17731b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - name: Fix binfmt and Cosmopolitan run: sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register" - name: Pinning packages - run: opam pin add -t -yn -vvv --kind=path . + run: opam pin add -t -yn -vvv --kind=path --with-version=dev . - name: Install cosmopolitan/esperanto and dune run: opam depext -iyt -v esperanto-cosmopolitan x86_64-esperanto aarch64-esperanto dune - name: Compiling example project (cat.com) From e7d582d20f094b0be968b2e4a089ba65d127b8b0 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 12:52:22 +0100 Subject: [PATCH 09/13] Use the last version of opam --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b17731b..ccedd2b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,11 +9,10 @@ jobs: runs-on: ${{ matrix.operating-system }} steps: - uses: actions/checkout@v2 - with: - lfs: true - uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: ${{ matrix.ocaml-version }} + allow-prerelease-opam: true # See jart/cosmopolitan#3 - name: Fix binfmt and Cosmopolitan run: sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register" From 54a9bffba9a86374cc6512e9d72d9047d44b1d13 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 12:59:33 +0100 Subject: [PATCH 10/13] Delete the useless pp_lnk into our link.ml script --- toolchain/install.ml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/toolchain/install.ml b/toolchain/install.ml index 97eeed2d..b451cbba 100644 --- a/toolchain/install.ml +++ b/toolchain/install.ml @@ -121,10 +121,6 @@ type action = | Copy of { exec : bool; src : string; dst : string } | Link of { src : string; dst : string } -let pp_lnk ppf = function - | Link { src; dst } -> Format.fprintf ppf "(Link (src:%S, dst:%S))" src dst - | _ -> () - let deps lnks = let tbl = Hashtbl.create 0x100 in let g = Hashtbl.create 0x100 in From c817e7033d50b0d9446a9b1dfe358bf3409b587d Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 13:00:37 +0100 Subject: [PATCH 11/13] esperanto-cosmopolitan requires digestif.1.0.0 --- opam/esperanto-cosmopolitan.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam/esperanto-cosmopolitan.opam b/opam/esperanto-cosmopolitan.opam index bc1d0cb5..ea657c10 100644 --- a/opam/esperanto-cosmopolitan.opam +++ b/opam/esperanto-cosmopolitan.opam @@ -17,7 +17,7 @@ depends: [ "dune" "decompress" {>= "1.5.3"} "checkseum" - "digestif" + "digestif" {>= "1.0.0"} # "conf-binutils" ] synopsis: "Cosmopolitan toolchain for OCaml compiler" From 9c8d7c13a42980e3584ac98ba89de882ea4ec121 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 15:01:49 +0100 Subject: [PATCH 12/13] {aarch64,x86_64}-esperanto is only available for opam >= 2.1.0 --- opam/aarch64-esperanto.opam | 1 + opam/x86_64-esperanto.opam | 1 + 2 files changed, 2 insertions(+) diff --git a/opam/aarch64-esperanto.opam b/opam/aarch64-esperanto.opam index 4743f4ad..aa14b8bd 100644 --- a/opam/aarch64-esperanto.opam +++ b/opam/aarch64-esperanto.opam @@ -12,6 +12,7 @@ build: [ ["sh" "-c" "make -C caml -j%{jobs}%"] ] install: ["sh" "-c" "make -C caml install" ] +available: opam-version >= "2.1.0" depends: [ "conf-which" {build} "ocaml-src" {build} diff --git a/opam/x86_64-esperanto.opam b/opam/x86_64-esperanto.opam index b4b38a8d..873a66dc 100644 --- a/opam/x86_64-esperanto.opam +++ b/opam/x86_64-esperanto.opam @@ -12,6 +12,7 @@ build: [ ["sh" "-c" "make -C caml -j%{jobs}%"] ] install: ["sh" "-c" "make -C caml install" ] +available: opam-version >= "2.1.0" depends: [ "conf-which" {build} "ocaml-src" {build} From 280ca6b92e74781c3b47453e6ab3d36cbcf5d19b Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Thu, 21 Dec 2023 15:13:31 +0100 Subject: [PATCH 13/13] esperanto-cosmopolitan requires opam 2.1 --- opam/esperanto-cosmopolitan.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam/esperanto-cosmopolitan.opam b/opam/esperanto-cosmopolitan.opam index ea657c10..a0f81627 100644 --- a/opam/esperanto-cosmopolitan.opam +++ b/opam/esperanto-cosmopolitan.opam @@ -22,4 +22,4 @@ depends: [ ] synopsis: "Cosmopolitan toolchain for OCaml compiler" description: "A little toolchain for OCaml with Cosmopolitan" -available: [ arch = "x86_64" & (os = "linux" | os = "freebsd" | os = "openbsd") ] +available: [ opam-version >= "2.1.0" & arch = "x86_64" & (os = "linux" | os = "freebsd" | os = "openbsd") ]