From 6ae64b9a4727f9e3949778a2331e46194d0fedd1 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 12 Apr 2024 09:48:22 +1200 Subject: [PATCH 1/4] Update tests to haskell-language-server 2.7 --- build.nix | 6 +++--- flake.lock | 18 ++++++++++++++++++ flake.nix | 1 + test/cabal.project.local | 2 +- test/haskell-language-server/cabal.nix | 22 ++-------------------- 5 files changed, 25 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 8a09c6a740..91d1a78dd1 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-27": "hls-27", "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..c2a7a938dd 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -25,7 +25,7 @@ repository ghcjs-overlay secure: True root-keys: key-threshold: 0 - --sha256: sha256-mZT7c+xR5cUTjLdCqOxpprjYL3kr/+9rmumtXvWAQlM= + --sha256: sha256-ddxP+nxBsM0SLvaiiB80k5DpX0PsKJq9VXhESPHKAF8= 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..f90637ef36 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 { @@ -32,6 +15,5 @@ in recurseIntoAttrs { # hls does not need to be cross compiled. 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.0.1" < 0; } From 633d1c44fe828a44c5b82dcdc4bcbac3b8d22611 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 12 Apr 2024 09:50:51 +1200 Subject: [PATCH 2/4] Update tests to haskell-language-server 2.7 --- flake.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 91d1a78dd1..2cde2d67b6 100644 --- a/flake.lock +++ b/flake.lock @@ -594,7 +594,7 @@ "hls-2.4": "hls-2.4", "hls-2.5": "hls-2.5", "hls-2.6": "hls-2.6", - "hls-27": "hls-27", + "hls-2.7": "hls-2.7", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", From 30c7324044b9c241026cfc313ca8490a484b3a89 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 15 Apr 2024 13:14:23 +1200 Subject: [PATCH 3/4] Bump hackage-overlay-ghcjs --- test/cabal.project.local | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index c2a7a938dd..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-ddxP+nxBsM0SLvaiiB80k5DpX0PsKJq9VXhESPHKAF8= + --sha256: sha256-+Eq62mUAS6rl0PYC5U0D3fH3P5tpnH/Y5qftZMgL7OM= if !impl(ghc>=9.10) && !os(ghcjs) active-repositories: hackage.haskell.org From 1135943abaaaac54dba390452a52e22b70443b16 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 15 Apr 2024 16:56:11 +1200 Subject: [PATCH 4/4] Skip hls for ghc 9.10 for now --- test/haskell-language-server/cabal.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/haskell-language-server/cabal.nix b/test/haskell-language-server/cabal.nix index f90637ef36..d42018329d 100644 --- a/test/haskell-language-server/cabal.nix +++ b/test/haskell-language-server/cabal.nix @@ -15,5 +15,6 @@ in recurseIntoAttrs { # hls does not need to be cross compiled. 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.0.1" < 0 + || __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.9.0" >= 0; }