From 02669e08eb2ca0cc34dff43c3124e0fa71ec73e1 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Tue, 9 Aug 2022 19:25:43 -0400 Subject: [PATCH] *.project.* files use program-options to specify -fno-ignore-asserts Simplifies *.project.* files a bit. It wasn't feasible before #7973, as program-options were applied to dependencies as well, which is undesirable. --- cabal.project | 29 +---------------------------- cabal.project.coverage | 11 +++-------- cabal.project.libonly | 13 ------------- cabal.project.validate | 11 +++++++---- cabal.project.validate.libonly | 9 ++++++--- 5 files changed, 17 insertions(+), 56 deletions(-) diff --git a/cabal.project b/cabal.project index aea54a32efe..5f0af8dfa4c 100644 --- a/cabal.project +++ b/cabal.project @@ -25,32 +25,5 @@ constraints: these -assoc constraints: text >= 2.0 constraints: time >= 1.12 --- So us hackers get all the assertion failures early: --- --- NOTE: currently commented out, see --- https://github.com/haskell/cabal/issues/3911 --- as a workaround we specify it for each package individually: --- --- program-options --- ghc-options: -fno-ignore-asserts --- -package Cabal - ghc-options: -fno-ignore-asserts - -package cabal-testsuite - ghc-options: -fno-ignore-asserts - -package Cabal-QuickCheck - ghc-options: -fno-ignore-asserts - -package Cabal-tree-diff - ghc-options: -fno-ignore-asserts - -package Cabal-described - ghc-options: -fno-ignore-asserts - -package cabal-install-solver - ghc-options: -fno-ignore-asserts - -package cabal-install +program-options ghc-options: -fno-ignore-asserts diff --git a/cabal.project.coverage b/cabal.project.coverage index 7c39810b88f..2afe3d10df7 100644 --- a/cabal.project.coverage +++ b/cabal.project.coverage @@ -28,6 +28,9 @@ allow-newer: windns-0.1.0.1:base constraints: rere -rere-cfg constraints: these +program-options + ghc-options: -fno-ignore-asserts + -- NOTE: for library coverage in multi-project builds, -- see: -- @@ -39,41 +42,33 @@ constraints: these -- the `cabal-install` library -- package Cabal-syntax - ghc-options: -fno-ignore-asserts coverage: False library-coverage: False package Cabal - ghc-options: -fno-ignore-asserts coverage: False library-coverage: False package cabal-testsuite - ghc-options: -fno-ignore-asserts coverage: False library-coverage: False package Cabal-QuickCheck - ghc-options: -fno-ignore-asserts coverage: False library-coverage: False package Cabal-tree-diff - ghc-options: -fno-ignore-asserts coverage: False library-coverage: False package Cabal-described - ghc-options: -fno-ignore-asserts coverage: False library-coverage: False package cabal-install-solver - ghc-options: -fno-ignore-asserts coverage: False library-coverage: False package cabal-install - ghc-options: -fno-ignore-asserts coverage: True library-coverage: True diff --git a/cabal.project.libonly b/cabal.project.libonly index e11d81f5d77..59873fd4ad1 100644 --- a/cabal.project.libonly +++ b/cabal.project.libonly @@ -11,17 +11,4 @@ tests: True --optional-packages: */ program-options - -- So us hackers get all the assertion failures early: - -- - -- NOTE: currently commented out, see - -- https://github.com/haskell/cabal/issues/3911 - -- - -- ghc-options: -fno-ignore-asserts - -- - -- as a workaround we specify it for each package individually: -package Cabal-syntax - ghc-options: -fno-ignore-asserts -package Cabal - ghc-options: -fno-ignore-asserts -package cabal-testsuite ghc-options: -fno-ignore-asserts diff --git a/cabal.project.validate b/cabal.project.validate index 6f9dc0b45d3..66e823f62b1 100644 --- a/cabal.project.validate +++ b/cabal.project.validate @@ -19,11 +19,14 @@ constraints: these -assoc write-ghc-environment-files: never +program-options + ghc-options: -fno-ignore-asserts + package Cabal-syntax - ghc-options: -Werror -fno-ignore-asserts + ghc-options: -Werror package Cabal - ghc-options: -Werror -fno-ignore-asserts + ghc-options: -Werror package cabal-testsuite - ghc-options: -Werror -fno-ignore-asserts + ghc-options: -Werror package cabal-install - ghc-options: -Werror -fno-ignore-asserts + ghc-options: -Werror diff --git a/cabal.project.validate.libonly b/cabal.project.validate.libonly index 2566a5cc8d2..3baafa1661a 100644 --- a/cabal.project.validate.libonly +++ b/cabal.project.validate.libonly @@ -14,12 +14,15 @@ write-ghc-environment-files: never constraints: rere -rere-cfg constraints: these -assoc +program-options + ghc-options: -fno-ignore-asserts + package Cabal-syntax - ghc-options: -Werror -fno-ignore-asserts + ghc-options: -Werror package Cabal - ghc-options: -Werror -fno-ignore-asserts + ghc-options: -Werror package cabal-testsuite - ghc-options: -Werror -fno-ignore-asserts + ghc-options: -Werror -- https://github.com/haskell-hvr/cryptohash-sha256/issues/12 allow-newer: cryptohash-sha256:base