Skip to content

Commit

Permalink
Clarify -Werr plus -W/-Wall warning
Browse files Browse the repository at this point in the history
-W -Wall is too (correctly) refused by Hackage.
  • Loading branch information
ffaf1 committed Jun 28, 2022
1 parent 37de451 commit 029b02b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cabal/src/Distribution/PackageDescription/Check.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1576,9 +1576,9 @@ checkDevelopmentOnlyFlagsOptions fieldName ghcOptions =

check has_WerrorWall $
PackageDistInexcusable $
"'" ++ fieldName ++ ": -Wall -Werror' makes the package very easy to "
"'" ++ fieldName ++ ": -Werror with -Wall or -W makes the package very easy to "
++ "break with future GHC versions because new GHC versions often "
++ "add new warnings. Use just '" ++ fieldName ++ ": -Wall' instead."
++ "add new warnings."
++ extraExplanation

, check (not has_WerrorWall && has_Werror) $
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Warning: 'ghc-shared-options: -hide-package' is never needed. Cabal hides all pa
Warning: The following errors will cause portability problems on other environments:
Warning: 'ghc-options: -fasm' is unnecessary and will not work on CPU architectures other than x86, x86-64, ppc or sparc.
Warning: 'ghc-prof-options: -fhpc' is not necessary. Use the configure flag --enable-coverage instead.
Warning: 'ghc-shared-options: -Wall -Werror' makes the package very easy to break with future GHC versions because new GHC versions often add new warnings. Use just 'ghc-shared-options: -Wall' instead. Alternatively, if you want to use this, make it conditional based on a Cabal configuration flag (with 'manual: True' and 'default: False') and enable that flag during development.
Warning: 'ghc-shared-options: -Werror with -Wall or -W makes the package very easy to break with future GHC versions because new GHC versions often add new warnings. Alternatively, if you want to use this, make it conditional based on a Cabal configuration flag (with 'manual: True' and 'default: False') and enable that flag during development.
Warning: Hackage would reject this package.

0 comments on commit 029b02b

Please sign in to comment.