From dd811a50d9d158b091d052d1c6da378683690000 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Sun, 23 Jun 2024 15:00:03 -0700 Subject: [PATCH 1/2] test on OCaml 5.2, improve nix flake --- .github/workflows/test.yml | 6 +++--- flake.nix | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 500a60ab..a911075a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ocamlVersion: [4_14, 5_0, 5_1] + ocamlVersion: [4_14, 5_1, 5_2] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'recursive' - - uses: cachix/install-nix-action@v20 + - uses: cachix/install-nix-action@v27 with: extra_nix_config: | extra-substituters = https://anmonteiro.nix-cache.workers.dev diff --git a/flake.nix b/flake.nix index 0acc7e76..d6bad692 100644 --- a/flake.nix +++ b/flake.nix @@ -12,13 +12,14 @@ pkgs = nixpkgs.legacyPackages."${system}".extend (self: super: { ocamlPackages = super.ocaml-ng.ocamlPackages_5_2; }); - in - rec { packages = pkgs.callPackage ./nix { nix-filter = nix-filter.lib; }; + in + { + packages = packages // { default = packages.h2; }; defaultPackage = packages.h2; - devShells = rec { + devShells = { default = pkgs.callPackage ./nix/shell.nix { inherit packages; }; - release = default.override { release-mode = true; }; + release = self.devShells.${system}.default.override { release-mode = true; }; }; }); } From e2e7ad6208eb33415540ca1c7c25ee545b81d4aa Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Sun, 23 Jun 2024 15:04:18 -0700 Subject: [PATCH 2/2] disable gen_static for OCaml 5.2 the Pexp_fun ast changed --- hpack/util/dune | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hpack/util/dune b/hpack/util/dune index 5c82bb65..335b0b11 100644 --- a/hpack/util/dune +++ b/hpack/util/dune @@ -1,3 +1,9 @@ -(executables - (names gen_huffman gen_static) +(executable + (name gen_huffman) (libraries compiler-libs.common)) + +(executable + (name gen_static) + (libraries compiler-libs.common) + (enabled_if + (< %{ocaml_version} 5.2)))