[commit: ghc] master: ghc-cabal: don't warn about missing cabal fields (14652b5)
git at git.haskell.org
git at git.haskell.org
Thu Jun 4 22:01:00 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/14652b519eca12411e92c28cd06de32612b0973a/ghc
>---------------------------------------------------------------
commit 14652b519eca12411e92c28cd06de32612b0973a
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Mon Jun 1 19:58:43 2015 +0200
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
>---------------------------------------------------------------
14652b519eca12411e92c28cd06de32612b0973a
utils/ghc-cabal/Main.hs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index f066251..4ae85ec 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
More information about the ghc-commits
mailing list