diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-06-01 19:58:43 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-06-04 23:58:28 +0200 |
commit | 14652b519eca12411e92c28cd06de32612b0973a (patch) | |
tree | d1c1d50fb9ef4753fb2b956224db0ca88d360d21 | |
parent | 75c6e0684dda585c37b4ac254cd7a13537a59a91 (diff) | |
download | haskell-14652b519eca12411e92c28cd06de32612b0973a.tar.gz |
ghc-cabal: don't warn about missing cabal fields
Only print and exit on errors. Warnings of the type
'PackageDistSuspicious' are not very useful.
The following show up in the build logs currently:
* The 'license' field is missing.
* No 'maintainer' field
* No 'category' field
* 'ghc-options: -O2' is rarely needed. Check that it is giving a real
benefit and not just imposing longer compile times on your users.
Differential Revision: https://phabricator.haskell.org/D944
-rw-r--r-- | utils/ghc-cabal/Main.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs index f0662519d8..4ae85ecbd0 100644 --- a/utils/ghc-cabal/Main.hs +++ b/utils/ghc-cabal/Main.hs @@ -114,11 +114,9 @@ doCheck directory $ do let verbosity = normal gpdFile <- defaultPackageDesc verbosity gpd <- readPackageDescription verbosity gpdFile - case partition isFailure $ checkPackage gpd Nothing of - ([], []) -> return () - ([], warnings) -> mapM_ print warnings - (errs, _) -> do mapM_ print errs - exitWith (ExitFailure 1) + case filter isFailure $ checkPackage gpd Nothing of + [] -> return () + errs -> mapM_ print errs >> exitWith (ExitFailure 1) where isFailure (PackageDistSuspicious {}) = False isFailure _ = True |