From c7129d254f9cd187ba0566118fa64a50c1101b79 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 15 Apr 2024 19:44:27 +1200 Subject: [PATCH] Update tests to haskell-language-server 2.7 (#2184) * Update tests to haskell-language-server 2.7 * Update tests to haskell-language-server 2.7 * Bump hackage-overlay-ghcjs * Skip hls for ghc 9.10 for now --- build.nix | 6 +++--- flake.lock | 18 ++++++++++++++++++ flake.nix | 1 + test/cabal.project.local | 4 ++-- test/haskell-language-server/cabal.nix | 21 ++------------------- 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/build.nix b/build.nix index 5a241c5eb8..2bf29be8de 100644 --- a/build.nix +++ b/build.nix @@ -58,10 +58,10 @@ in rec { inherit evalPackages; src = pkgs.haskell-nix.sources."hls-2.2"; }; - } // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.8") { - "hls-26" = tool compiler-nix-name "haskell-language-server" { + } // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.10") { + "hls-27" = tool compiler-nix-name "haskell-language-server" { inherit evalPackages; - src = pkgs.haskell-nix.sources."hls-2.6"; + src = pkgs.haskell-nix.sources."hls-2.7"; }; }) ); diff --git a/flake.lock b/flake.lock index 975f18e63e..01320bafeb 100644 --- a/flake.lock +++ b/flake.lock @@ -289,6 +289,23 @@ "type": "github" } }, + "hls-2.7": { + "flake": false, + "locked": { + "lastModified": 1708965829, + "narHash": "sha256-LfJ+TBcBFq/XKoiNI7pc4VoHg4WmuzsFxYJ3Fu+Jf+M=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "50322b0a4aefb27adc5ec42f5055aaa8f8e38001", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.7.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -577,6 +594,7 @@ "hls-2.4": "hls-2.4", "hls-2.5": "hls-2.5", "hls-2.6": "hls-2.6", + "hls-2.7": "hls-2.7", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", diff --git a/flake.nix b/flake.nix index 93b9194b72..c1b1d657fa 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,7 @@ "hls-2.4" = { url = "github:haskell/haskell-language-server/2.4.0.1"; flake = false; }; "hls-2.5" = { url = "github:haskell/haskell-language-server/2.5.0.0"; flake = false; }; "hls-2.6" = { url = "github:haskell/haskell-language-server/2.6.0.0"; flake = false; }; + "hls-2.7" = { url = "github:haskell/haskell-language-server/2.7.0.0"; flake = false; }; hydra.url = "hydra"; hackage = { url = "github:input-output-hk/hackage.nix"; diff --git a/test/cabal.project.local b/test/cabal.project.local index 6ed377e774..c481569919 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -21,11 +21,11 @@ repository head.hackage.ghc.haskell.org --sha256: sha256-h/vbKTUdGVdkt2ogJer2d+gRuHkayiblQ7oFRqpj14c= repository ghcjs-overlay - url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/91f4ce9bea0e7f739b7495647c3f72a308ed1c6f + url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ed91ac93832fdfc50471ab8df13b8174e91b35ed secure: True root-keys: key-threshold: 0 - --sha256: sha256-mZT7c+xR5cUTjLdCqOxpprjYL3kr/+9rmumtXvWAQlM= + --sha256: sha256-+Eq62mUAS6rl0PYC5U0D3fH3P5tpnH/Y5qftZMgL7OM= if !impl(ghc>=9.10) && !os(ghcjs) active-repositories: hackage.haskell.org diff --git a/test/haskell-language-server/cabal.nix b/test/haskell-language-server/cabal.nix index 7c9429c0c5..d42018329d 100644 --- a/test/haskell-language-server/cabal.nix +++ b/test/haskell-language-server/cabal.nix @@ -3,24 +3,7 @@ let project = haskell-nix.cabalProject' { inherit compiler-nix-name evalPackages; name = "haskell-language-server"; - src = haskell-nix.sources."hls-2.6"; - # Even though this is in the cabal.project it is inside a condional - # and so haskell.nix cannot parse it properly. Luckily adding it - # again seems to work fine. - cabalProjectLocal = '' - repository head.hackage.ghc.haskell.org - url: https://ghc.gitlab.haskell.org/head.hackage/ - secure: True - key-threshold: 3 - root-keys: - f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 - 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 - 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-Bkn2Etb0JVmb7tM7jxuIoYLFnSp7acqraEYVq0I5oUM= - - if impl(ghc < 9.7) - active-repositories: hackage.haskell.org - ''; + src = haskell-nix.sources."hls-2.7"; configureArgs = "--disable-benchmarks --disable-tests"; }; in recurseIntoAttrs { @@ -33,5 +16,5 @@ in recurseIntoAttrs { meta.disabled = stdenv.hostPlatform != stdenv.buildPlatform || __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.0.1" < 0 - || __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.8.0" >= 0; + || __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.9.0" >= 0; }