Skip to content

Commit 41d5864

Browse files
committed
PackageDescription warnings for normal verbosity
This commit makes it so that cabal-install emits PackageDescription parser warnings at normal verbosity or above. Previously, we used to emit warnings at verbosity >= verbose, but now that we are going through in-library methods this meant we could skip ever emitting some warnings, which is not desirable.
1 parent 9e3da65 commit 41d5864

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cabal-install/src/Distribution/Client/ProjectConfig.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,8 +1522,8 @@ renderCabalFileParseError :: CabalFileParseError -> String
15221522
renderCabalFileParseError (CabalFileParseError filePath contents errors _ warnings) =
15231523
renderParseError filePath contents errors warnings
15241524

1525-
-- | Wrapper for the @.cabal@ file parser. It reports warnings on higher
1526-
-- verbosity levels and throws 'CabalFileParseError' on failure.
1525+
-- | Wrapper for the @.cabal@ file parser. It reports warnings at normal
1526+
-- verbosity level, and throws 'CabalFileParseError' on failure.
15271527
readSourcePackageCabalFile
15281528
:: Verbosity
15291529
-> FilePath
@@ -1533,7 +1533,7 @@ readSourcePackageCabalFile verbosity pkgfilename content =
15331533
case runParseResult (parseGenericPackageDescription content) of
15341534
(warnings, Right pkg) -> do
15351535
unless (null warnings) $
1536-
info verbosity (formatWarnings warnings)
1536+
notice verbosity (formatWarnings warnings)
15371537
return pkg
15381538
(warnings, Left (mspecVersion, errors)) ->
15391539
throwIO $ CabalFileParseError pkgfilename content errors mspecVersion warnings

0 commit comments

Comments
 (0)