mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-02-18 17:25:49 +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
|
{ bfEnableTests :: !Bool
|
||||||
, bfDoUpload :: !Bool
|
, bfDoUpload :: !Bool
|
||||||
, bfEnableLibProfile :: !Bool
|
, bfEnableLibProfile :: !Bool
|
||||||
|
, bfVerbose :: !Bool
|
||||||
} deriving (Show)
|
} deriving (Show)
|
||||||
|
|
||||||
data BuildType = Nightly | LTS BumpType
|
data BuildType = Nightly | LTS BumpType
|
||||||
@ -182,6 +183,7 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do
|
|||||||
, pbGlobalInstall = False
|
, pbGlobalInstall = False
|
||||||
, pbEnableTests = bfEnableTests buildFlags
|
, pbEnableTests = bfEnableTests buildFlags
|
||||||
, pbEnableLibProfiling = bfEnableLibProfile buildFlags
|
, pbEnableLibProfiling = bfEnableLibProfile buildFlags
|
||||||
|
, pbVerbose = bfVerbose buildFlags
|
||||||
}
|
}
|
||||||
performBuild pb >>= mapM_ putStrLn
|
performBuild pb >>= mapM_ putStrLn
|
||||||
|
|
||||||
|
|||||||
@ -63,6 +63,7 @@ data PerformBuild = PerformBuild
|
|||||||
-- ^ Register packages in the global database
|
-- ^ Register packages in the global database
|
||||||
, pbEnableTests :: Bool
|
, pbEnableTests :: Bool
|
||||||
, pbEnableLibProfiling :: Bool
|
, pbEnableLibProfiling :: Bool
|
||||||
|
, pbVerbose :: Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
data PackageInfo = PackageInfo
|
data PackageInfo = PackageInfo
|
||||||
@ -316,7 +317,8 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
|
|||||||
PackageConstraints {..} = ppConstraints $ piPlan sbPackageInfo
|
PackageConstraints {..} = ppConstraints $ piPlan sbPackageInfo
|
||||||
|
|
||||||
buildLibrary = wf libOut $ \outH -> do
|
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
|
log' $ "Unpacking " ++ namever
|
||||||
runParent outH "cabal" ["unpack", namever]
|
runParent outH "cabal" ["unpack", namever]
|
||||||
|
|
||||||
|
|||||||
@ -69,4 +69,7 @@ main =
|
|||||||
help "Skip uploading bundle, docs, etc.")) <*>
|
help "Skip uploading bundle, docs, etc.")) <*>
|
||||||
switch
|
switch
|
||||||
(long "enable-library-profiling" <>
|
(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