From 2896369067027f2b283a9d2e902560c822defc4e Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Thu, 23 Sep 2021 09:00:27 +0100 Subject: hadrian: Rework the verbosity levels Before we really only had two verbosity levels, normal and verbose. There are now three levels: Normal: Commands show stderr (no stdout) and minimal build failure messages. Verbose (-V): Commands also show stdout, build failure message contains callstack and additional information Diagnostic (-VV): Very verbose output showing all command lines and passing -v3 to cabal commands. -V is similar to the default verbosity from before (but a little more verbose) --- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hadrian/src/Hadrian/Haskell/Cabal/Parse.hs') diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs index 49f5aa8802..d34951a5ef 100644 --- a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs +++ b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs @@ -154,7 +154,7 @@ configurePackage context@Context {..} = do verbosity <- getVerbosity when (verbosity >= Verbose) $ putProgressInfo $ "| Package " ++ quote (pkgName package) ++ " configuration flags: " ++ unwords argList - let v = if verbosity >= Verbose then "-v3" else "-v0" + let v = if verbosity >= Diagnostic then "-v3" else "-v0" traced "cabal-configure" $ C.defaultMainWithHooksNoReadArgs hooks gpd (argList ++ ["--flags=" ++ unwords flagList, v]) @@ -175,7 +175,7 @@ copyPackage context@Context {..} = do ctxPath <- Context.contextPath context pkgDbPath <- packageDbPath stage verbosity <- getVerbosity - let v = if verbosity >= Verbose then "-v3" else "-v0" + let v = if verbosity >= Diagnostic then "-v3" else "-v0" traced "cabal-copy" $ C.defaultMainWithHooksNoReadArgs C.autoconfUserHooks gpd [ "copy", "--builddir", ctxPath, "--target-package-db", pkgDbPath, v ] @@ -187,7 +187,7 @@ registerPackage context@Context {..} = do ctxPath <- Context.contextPath context gpd <- pkgGenericDescription package verbosity <- getVerbosity - let v = if verbosity >= Verbose then "-v3" else "-v0" + let v = if verbosity >= Diagnostic then "-v3" else "-v0" traced "cabal-register" $ C.defaultMainWithHooksNoReadArgs C.autoconfUserHooks gpd [ "register", "--builddir", ctxPath, v ] -- cgit v1.2.1