mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-11 23:08:30 +01:00
Add simple verbose mode (-v) for debugging
This commit is contained in:
parent
335fa91385
commit
5712c2172a
@ -30,6 +30,7 @@ data BuildFlags = BuildFlags
|
||||
{ bfEnableTests :: !Bool
|
||||
, bfDoUpload :: !Bool
|
||||
, bfEnableLibProfile :: !Bool
|
||||
, bfVerbose :: !Bool
|
||||
} deriving (Show)
|
||||
|
||||
data BuildType = Nightly | LTS BumpType
|
||||
@ -182,6 +183,7 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do
|
||||
, pbGlobalInstall = False
|
||||
, pbEnableTests = bfEnableTests buildFlags
|
||||
, pbEnableLibProfiling = bfEnableLibProfile buildFlags
|
||||
, pbVerbose = bfVerbose buildFlags
|
||||
}
|
||||
performBuild pb >>= mapM_ putStrLn
|
||||
|
||||
|
||||
@ -63,6 +63,7 @@ data PerformBuild = PerformBuild
|
||||
-- ^ Register packages in the global database
|
||||
, pbEnableTests :: Bool
|
||||
, pbEnableLibProfiling :: Bool
|
||||
, pbVerbose :: Bool
|
||||
}
|
||||
|
||||
data PackageInfo = PackageInfo
|
||||
@ -316,7 +317,8 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
|
||||
PackageConstraints {..} = ppConstraints $ piPlan sbPackageInfo
|
||||
|
||||
buildLibrary = wf libOut $ \outH -> do
|
||||
let run = runChild outH
|
||||
let run a b = do when pbVerbose $ log' (unwords (a : b))
|
||||
runChild outH a b
|
||||
log' $ "Unpacking " ++ namever
|
||||
runParent outH "cabal" ["unpack", namever]
|
||||
|
||||
|
||||
@ -69,4 +69,7 @@ main =
|
||||
help "Skip uploading bundle, docs, etc.")) <*>
|
||||
switch
|
||||
(long "enable-library-profiling" <>
|
||||
help "Enable profiling when building")
|
||||
help "Enable profiling when building") <*>
|
||||
switch
|
||||
(long "verbose" <> short 'v' <>
|
||||
help "Output verbose detail about the build steps")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user