Fail on all warnings in CI
All the undefineds are gone, so it's time to enable -Werror in CI.
This commit is contained in:
parent
97a5c61f28
commit
0b22bb099c
5 changed files with 14 additions and 11 deletions
2
.github/actions/nix-build/entrypoint.sh
vendored
2
.github/actions/nix-build/entrypoint.sh
vendored
|
@ -16,7 +16,7 @@ file="$1"
|
|||
[ ! -e "$file" ] && echo "File $file not exist!" && exit 1
|
||||
|
||||
echo "Building all attrs in $file..."
|
||||
nix-build --no-link ${QUIET_ARG} "$file"
|
||||
nix-build --no-link ${QUIET_ARG} "$file" "${@:2}"
|
||||
|
||||
echo "Copying build closure to $(pwd)/store..."
|
||||
mapfile -t storePaths < <(nix-build ${QUIET_ARG} --no-link "$file" | grep -v cache-deps)
|
||||
|
|
2
.github/workflows/haskell.yml
vendored
2
.github/workflows/haskell.yml
vendored
|
@ -11,5 +11,5 @@ jobs:
|
|||
- uses: actions/checkout@v1
|
||||
- name: Nix Build
|
||||
with:
|
||||
args: default.nix
|
||||
args: default.nix --arg failOnWarnings true
|
||||
uses: ./.github/actions/nix-build
|
||||
|
|
16
default.nix
16
default.nix
|
@ -1,11 +1,15 @@
|
|||
{ nixpkgs ? import ./nixpkgs.nix {}
|
||||
, compiler ? "ghc865" }:
|
||||
, compiler ? "ghc865"
|
||||
, failOnWarnings ? false
|
||||
}:
|
||||
let
|
||||
inherit (nixpkgs) pkgs;
|
||||
inherit (nixpkgs) pkgs lib;
|
||||
inherit (lib) id;
|
||||
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {};
|
||||
hie = all-hies.selection { selector = p: { inherit (p) ghc865; }; };
|
||||
xanthous = (pkgs.haskellPackages
|
||||
.extend (import ./haskell-overlay.nix { inherit nixpkgs; }))
|
||||
.callPackage (import ./pkg.nix { inherit nixpkgs; }) {};
|
||||
in
|
||||
xanthous =
|
||||
(if failOnWarnings then pkgs.haskell.lib.failOnAllWarnings else id)
|
||||
((pkgs.haskellPackages
|
||||
.extend (import ./haskell-overlay.nix { inherit nixpkgs; })
|
||||
).callPackage (import ./pkg.nix { inherit nixpkgs; }) {}); in
|
||||
xanthous // { inherit hie; }
|
||||
|
|
|
@ -411,5 +411,5 @@ entityMenu_ = mkMenuItems @[_] . map entityMenuItem
|
|||
then ec
|
||||
else 'a'
|
||||
|
||||
entityMenu :: Entity entity => [entity] -> Map Char (MenuOption entity)
|
||||
entityMenu = map (map runIdentity) . entityMenu_ . fmap Identity
|
||||
-- entityMenu :: Entity entity => [entity] -> Map Char (MenuOption entity)
|
||||
-- entityMenu = map (map runIdentity) . entityMenu_ . fmap Identity
|
||||
|
|
|
@ -14,7 +14,6 @@ import Test.QuickCheck.Function
|
|||
import Test.QuickCheck.Instances.ByteString ()
|
||||
import Test.QuickCheck.Arbitrary.Generic
|
||||
import Data.Aeson
|
||||
import Data.Coerce
|
||||
import GHC.Generics (Rep)
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue