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

Enable ghc plugin test for 9.8.1 and above #2158

Merged
merged 9 commits into from
Feb 11, 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
2 changes: 2 additions & 0 deletions modules/component-driver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ in
++ lib.optionals (builtins.compareVersions config.compiler.version "8.11" >= 0) [
# stm and exceptions are needed by the GHC package since 9.0.1
"stm" "exceptions"]
++ lib.optionals (builtins.compareVersions config.compiler.version "9.8.1" >= 0) [
"semaphore-compat"]
)
++ lib.optionals (!config.reinstallableLibGhc || __elem config.compiler.nix-name ["ghc865"]) [
"ghc-heap"
Expand Down
6 changes: 4 additions & 2 deletions test/plugin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ let
project = project' {
inherit compiler-nix-name evalPackages;
src = testSrc "plugin";
modules = [{
reinstallableLibGhc = builtins.compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.8.1" < 0;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to make this automatic, e.g. as part of comp-builder.nix or similar? Otherwise any project building with 9.8.1. & plugins will have this same problem. (Apologies for commenting on a merged PR; I only thought of this over the weekend ...)

}];
};

packages = project.hsPkgs;
Expand All @@ -17,8 +20,7 @@ in recurseIntoAttrs {

# Not sure why this breaks for ghc 8.10.7
meta.disabled = compiler-nix-name == "ghc8107"
# TODO remove once polysemy works with ghc 9.8.1
|| __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.8.1" >= 0
|| compiler-nix-name == "ghc9920231203"
|| stdenv.hostPlatform.isMusl
|| stdenv.hostPlatform.isGhcjs
|| stdenv.hostPlatform.isWindows
Expand Down
Loading