Extra GHC flags on CI, and do not error on deprecations

This commit is contained in:
Tom Sydney Kerckhove 2022-06-28 13:38:52 +02:00
parent 2b05f3a567
commit 3ae5182fcc
2 changed files with 26 additions and 1 deletions

View File

@ -5,7 +5,29 @@ with final.haskell.lib;
autodocodecPackages =
let
autodocodecPkg = name:
doBenchmark (buildStrictly (final.haskellPackages.callCabal2nixWithOptions name (final.gitignoreSource (../. + "/${name}")) "--no-hpack" { }));
buildStrictly (
overrideCabal (final.haskellPackages.callCabal2nixWithOptions name (final.gitignoreSource (../. + "/${name}")) "--no-hpack" { })
(old: {
doBenchmark = true;
configureFlags = (old.configureFlags or [ ]) ++ [
# Optimisations
"--ghc-options=-O2"
# Extra warnings
"--ghc-options=-Wall"
"--ghc-options=-Wincomplete-uni-patterns"
"--ghc-options=-Wincomplete-record-updates"
"--ghc-options=-Wpartial-fields"
"--ghc-options=-Widentities"
"--ghc-options=-Wredundant-constraints"
"--ghc-options=-Wcpp-undef"
"--ghc-options=-Werror"
"--ghc-options=-Wno-deprecations"
];
# Ugly hack because we can't just add flags to the 'test' invocation.
# Show test output as we go, instead of all at once afterwards.
testTarget = (old.testTarget or "") + " --show-details=direct";
})
);
in
final.lib.genAttrs [
"autodocodec"

View File

@ -36,5 +36,8 @@ extra-deps:
- sydtest-discover
- envparse-0.4.1@sha256:989902e6368532548f61de1fa245ad2b39176cddd8743b20071af519a709ce30,2842
ghc-options:
"$locals": -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wpartial-fields -Widentities -Wredundant-constraints -Wcpp-undef
nix:
shell-file: shell.nix