From c305f1c47f8d96fab3c121448c7e460ea08188f7 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 4 Dec 2023 18:41:14 -0800 Subject: [PATCH 1/6] chore(nix): use OCaml 5.1.1-rc1 --- flake.lock | 6 +++--- flake.nix | 11 +---------- nix/ci/test.nix | 11 +---------- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/flake.lock b/flake.lock index 89485e9e07..d59f407f6f 100644 --- a/flake.lock +++ b/flake.lock @@ -64,11 +64,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1701726509, - "narHash": "sha256-6VqCX1ms698Fu4T2ce0iMyZp0ltpD2Jr6luxD9kWN8c=", + "lastModified": 1701741952, + "narHash": "sha256-EVUxBPAWbSsCxLIl0jMkxVh36cVa9RV7+LNXI87Syh8=", "owner": "nix-ocaml", "repo": "nix-overlays", - "rev": "5d0e6d60f9a87def7093c466c81bf65455a56574", + "rev": "ddcf8f89e9a5fce2a44a283c07a9c76770245926", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e4e9ff4998..697132fbf2 100644 --- a/flake.nix +++ b/flake.nix @@ -26,16 +26,7 @@ } // (flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}".extend (self: super: { - ocamlPackages = super.ocaml-ng.ocamlPackages_5_1.overrideScope' (oself: osuper: { - ocaml = osuper.ocaml.overrideAttrs (_: { - src = super.fetchFromGitHub { - owner = "ocaml"; - repo = "ocaml"; - rev = "eee78bf992a2b3e1e99af5e2af1c6ae5ba291ff1"; - hash = "sha256-PViNwld8Za6F5v8np3x8cP70JXpTrcIkgodPuJGpfyo="; - }; - }); - }); + ocamlPackages = super.ocaml-ng.ocamlPackages_5_1; }); packages = diff --git a/nix/ci/test.nix b/nix/ci/test.nix index a5b0390cff..0777fc1143 100644 --- a/nix/ci/test.nix +++ b/nix/ci/test.nix @@ -19,16 +19,7 @@ let pkgs = import src { extraOverlays = [ (self: super: { - ocamlPackages = super.ocaml-ng."ocamlPackages_${ocamlVersion}".overrideScope' (oself: osuper: { - ocaml = osuper.ocaml.overrideAttrs (_: { - src = super.fetchFromGitHub { - owner = "ocaml"; - repo = "ocaml"; - rev = "eee78bf992a2b3e1e99af5e2af1c6ae5ba291ff1"; - hash = "sha256-PViNwld8Za6F5v8np3x8cP70JXpTrcIkgodPuJGpfyo="; - }; - }); - }); + ocamlPackages = super.ocaml-ng."ocamlPackages_${ocamlVersion}"; }) ]; }; From 802c818c0c04251c56fd399e131d588c6e7d292b Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 4 Dec 2023 18:44:31 -0800 Subject: [PATCH 2/6] chore(opam-ci): use ocaml 5.1.1~rc1 --- .github/workflows/opam-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/opam-build.yml b/.github/workflows/opam-build.yml index 4025d83fdf..357104299c 100644 --- a/.github/workflows/opam-build.yml +++ b/.github/workflows/opam-build.yml @@ -25,7 +25,7 @@ jobs: - ubuntu-latest # - windows-latest # for some reason windows build is not picking dune 3.5 ocaml-compiler: - - ocaml-variants.5.1.1+trunk + - ocaml-variants.5.1.1~rc1 runs-on: ${{ matrix.os }} From e704675333b12ed914fc6c1a6a28f35a1c182eca Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 4 Dec 2023 18:50:04 -0800 Subject: [PATCH 3/6] try to fix opam package name --- .github/workflows/opam-build.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/opam-build.yml b/.github/workflows/opam-build.yml index 357104299c..7a07b400c2 100644 --- a/.github/workflows/opam-build.yml +++ b/.github/workflows/opam-build.yml @@ -25,7 +25,7 @@ jobs: - ubuntu-latest # - windows-latest # for some reason windows build is not picking dune 3.5 ocaml-compiler: - - ocaml-variants.5.1.1~rc1 + - ocaml-base-compiler.5.1.1~rc1 runs-on: ${{ matrix.os }} diff --git a/Makefile b/Makefile index 6bc7cadd9d..5b50b08ae3 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ test: .PHONY: opam-create-switch opam-create-switch: ## Create opam switch - opam switch create . ocaml-variants.5.1.1+trunk -y --no-install + opam switch create . ocaml-variants.5.1.1~rc1 -y --no-install .PHONY: opam-install-test opam-install-test: ## Install test dependencies From 885de703a24846f3c59167713b70ee46e50ddedb Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 4 Dec 2023 19:00:07 -0800 Subject: [PATCH 4/6] chore: fix Makefile to use `ocaml-base-compiler.5.1.1~rc1` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5b50b08ae3..c87f00c590 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ test: .PHONY: opam-create-switch opam-create-switch: ## Create opam switch - opam switch create . ocaml-variants.5.1.1~rc1 -y --no-install + opam switch create . ocaml-base-compiler.5.1.1~rc1 -y --no-install .PHONY: opam-install-test opam-install-test: ## Install test dependencies From 05513cd0e923a18d4cdbec8da8004c5219750b84 Mon Sep 17 00:00:00 2001 From: Javier Chavarri Date: Tue, 5 Dec 2023 14:58:12 +0000 Subject: [PATCH 5/6] use pin-depends --- Makefile | 4 ---- melange.opam | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c87f00c590..70e3c882f9 100644 --- a/Makefile +++ b/Makefile @@ -29,10 +29,6 @@ opam-create-switch: ## Create opam switch .PHONY: opam-install-test opam-install-test: ## Install test dependencies - opam pin add js_of_ocaml-compiler --dev-repo -y - opam pin add js_of_ocaml --dev-repo -y - opam pin add merlin-lib git+https://github.com/voodoos/merlin#5.1.1-upgrade - opam pin add merlin git+https://github.com/voodoos/merlin#5.1.1-upgrade opam pin add melange.dev . --with-test -y opam pin add melange-playground.dev . --with-test -y diff --git a/melange.opam b/melange.opam index 5a74f30264..0efd26a4bb 100644 --- a/melange.opam +++ b/melange.opam @@ -13,6 +13,7 @@ depends: [ "dune-build-info" "cppo" {build} "ounit" {with-test} + "melange" {with-melange} "reason" {with-test & >= "3.9.0"} "ppxlib" {>= "0.30.0"} "menhir" {>= "20201214"} @@ -36,3 +37,10 @@ build: [ ] ] dev-repo: "git+https://github.com/melange-re/melange.git" + +pin-depends: [ + [ "js_of_ocaml-compiler.dev" "https://github.com/ocsigen/js_of_ocaml/archive/31e5d22f96435e511c8bd6e2a6d43f7c5fb13dec.tar.gz" ] + [ "js_of_ocaml.dev" "https://github.com/ocsigen/js_of_ocaml/archive/31e5d22f96435e511c8bd6e2a6d43f7c5fb13dec.tar.gz" ] + [ "merlin-lib.dev" "https://github.com/voodoos/merlin/archive/15491d05db13ec6beaf3c84632914c29b674270d.tar.gz" ] + [ "merlin.dev" "https://github.com/voodoos/merlin/archive/15491d05db13ec6beaf3c84632914c29b674270d.tar.gz" ] +] From 5dfde9d7590f0fd762f6e947fbd680f5eaba0dec Mon Sep 17 00:00:00 2001 From: Javier Chavarri Date: Tue, 5 Dec 2023 15:01:14 +0000 Subject: [PATCH 6/6] use template --- melange.opam | 2 -- melange.opam.template | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 melange.opam.template diff --git a/melange.opam b/melange.opam index 0efd26a4bb..5573c93518 100644 --- a/melange.opam +++ b/melange.opam @@ -13,7 +13,6 @@ depends: [ "dune-build-info" "cppo" {build} "ounit" {with-test} - "melange" {with-melange} "reason" {with-test & >= "3.9.0"} "ppxlib" {>= "0.30.0"} "menhir" {>= "20201214"} @@ -37,7 +36,6 @@ build: [ ] ] dev-repo: "git+https://github.com/melange-re/melange.git" - pin-depends: [ [ "js_of_ocaml-compiler.dev" "https://github.com/ocsigen/js_of_ocaml/archive/31e5d22f96435e511c8bd6e2a6d43f7c5fb13dec.tar.gz" ] [ "js_of_ocaml.dev" "https://github.com/ocsigen/js_of_ocaml/archive/31e5d22f96435e511c8bd6e2a6d43f7c5fb13dec.tar.gz" ] diff --git a/melange.opam.template b/melange.opam.template new file mode 100644 index 0000000000..47b6ba86bb --- /dev/null +++ b/melange.opam.template @@ -0,0 +1,6 @@ +pin-depends: [ + [ "js_of_ocaml-compiler.dev" "https://github.com/ocsigen/js_of_ocaml/archive/31e5d22f96435e511c8bd6e2a6d43f7c5fb13dec.tar.gz" ] + [ "js_of_ocaml.dev" "https://github.com/ocsigen/js_of_ocaml/archive/31e5d22f96435e511c8bd6e2a6d43f7c5fb13dec.tar.gz" ] + [ "merlin-lib.dev" "https://github.com/voodoos/merlin/archive/15491d05db13ec6beaf3c84632914c29b674270d.tar.gz" ] + [ "merlin.dev" "https://github.com/voodoos/merlin/archive/15491d05db13ec6beaf3c84632914c29b674270d.tar.gz" ] +]