Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests to haskell-language-server 2.7 #2184

Merged
merged 5 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
})
);
Expand Down
18 changes: 18 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions test/cabal.project.local
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 2 additions & 19 deletions test/haskell-language-server/cabal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}