mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-22 12:11:56 +01:00
Merge pull request #452 from phadej/skip-haddock
Add --skip-haddock -flag
This commit is contained in:
commit
afdd1c6abc
@ -33,6 +33,7 @@ import System.IO (BufferMode (LineBuffering), hSetBuffering)
|
|||||||
-- | Flags passed in from the command line.
|
-- | Flags passed in from the command line.
|
||||||
data BuildFlags = BuildFlags
|
data BuildFlags = BuildFlags
|
||||||
{ bfEnableTests :: !Bool
|
{ bfEnableTests :: !Bool
|
||||||
|
, bfEnableHaddock :: !Bool
|
||||||
, bfDoUpload :: !Bool
|
, bfDoUpload :: !Bool
|
||||||
, bfEnableLibProfile :: !Bool
|
, bfEnableLibProfile :: !Bool
|
||||||
, bfVerbose :: !Bool
|
, bfVerbose :: !Bool
|
||||||
@ -203,6 +204,7 @@ getPerformBuild buildFlags Settings {..} = PerformBuild
|
|||||||
, pbJobs = 8
|
, pbJobs = 8
|
||||||
, pbGlobalInstall = False
|
, pbGlobalInstall = False
|
||||||
, pbEnableTests = bfEnableTests buildFlags
|
, pbEnableTests = bfEnableTests buildFlags
|
||||||
|
, pbEnableHaddock = bfEnableHaddock buildFlags
|
||||||
, pbEnableLibProfiling = bfEnableLibProfile buildFlags
|
, pbEnableLibProfiling = bfEnableLibProfile buildFlags
|
||||||
, pbVerbose = bfVerbose buildFlags
|
, pbVerbose = bfVerbose buildFlags
|
||||||
, pbAllowNewer = bfSkipCheck buildFlags
|
, pbAllowNewer = bfSkipCheck buildFlags
|
||||||
|
|||||||
@ -28,6 +28,7 @@ data InstallFlags = InstallFlags
|
|||||||
, ifJobs :: !Int
|
, ifJobs :: !Int
|
||||||
, ifGlobalInstall :: !Bool
|
, ifGlobalInstall :: !Bool
|
||||||
, ifEnableTests :: !Bool
|
, ifEnableTests :: !Bool
|
||||||
|
, ifEnableHaddock :: !Bool
|
||||||
, ifEnableLibProfiling :: !Bool
|
, ifEnableLibProfiling :: !Bool
|
||||||
, ifVerbose :: !Bool
|
, ifVerbose :: !Bool
|
||||||
, ifSkipCheck :: !Bool
|
, ifSkipCheck :: !Bool
|
||||||
@ -48,6 +49,7 @@ getPerformBuild plan InstallFlags{..} =
|
|||||||
, pbJobs = ifJobs
|
, pbJobs = ifJobs
|
||||||
, pbGlobalInstall = ifGlobalInstall
|
, pbGlobalInstall = ifGlobalInstall
|
||||||
, pbEnableTests = ifEnableTests
|
, pbEnableTests = ifEnableTests
|
||||||
|
, pbEnableHaddock = ifEnableHaddock
|
||||||
, pbEnableLibProfiling = ifEnableLibProfiling
|
, pbEnableLibProfiling = ifEnableLibProfiling
|
||||||
, pbVerbose = ifVerbose
|
, pbVerbose = ifVerbose
|
||||||
, pbAllowNewer = ifSkipCheck
|
, pbAllowNewer = ifSkipCheck
|
||||||
|
|||||||
@ -62,6 +62,7 @@ data PerformBuild = PerformBuild
|
|||||||
, pbGlobalInstall :: Bool
|
, pbGlobalInstall :: Bool
|
||||||
-- ^ Register packages in the global database
|
-- ^ Register packages in the global database
|
||||||
, pbEnableTests :: Bool
|
, pbEnableTests :: Bool
|
||||||
|
, pbEnableHaddock :: Bool
|
||||||
, pbEnableLibProfiling :: Bool
|
, pbEnableLibProfiling :: Bool
|
||||||
, pbVerbose :: Bool
|
, pbVerbose :: Bool
|
||||||
, pbAllowNewer :: Bool
|
, pbAllowNewer :: Bool
|
||||||
@ -354,7 +355,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
|
|||||||
-- dependency's haddocks before this finishes
|
-- dependency's haddocks before this finishes
|
||||||
atomically $ putTMVar (piResult sbPackageInfo) True
|
atomically $ putTMVar (piResult sbPackageInfo) True
|
||||||
|
|
||||||
when (pcHaddocks /= Don'tBuild && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo)) $ do
|
when (pbEnableHaddock && pcHaddocks /= Don'tBuild && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo)) $ do
|
||||||
log' $ "Haddocks " ++ namever
|
log' $ "Haddocks " ++ namever
|
||||||
hfs <- readTVarIO sbHaddockFiles
|
hfs <- readTVarIO sbHaddockFiles
|
||||||
let hfsOpts = flip map (mapToList hfs) $ \(pkgVer, hf) -> concat
|
let hfsOpts = flip map (mapToList hfs) $ \(pkgVer, hf) -> concat
|
||||||
|
|||||||
@ -77,6 +77,11 @@ main =
|
|||||||
(switch
|
(switch
|
||||||
(long "skip-tests" <>
|
(long "skip-tests" <>
|
||||||
help "Skip build and running the test suites")) <*>
|
help "Skip build and running the test suites")) <*>
|
||||||
|
fmap
|
||||||
|
not
|
||||||
|
(switch
|
||||||
|
(long "skip-haddock" <>
|
||||||
|
help "Skip generating haddock documentation")) <*>
|
||||||
fmap
|
fmap
|
||||||
not
|
not
|
||||||
(switch
|
(switch
|
||||||
@ -136,6 +141,11 @@ main =
|
|||||||
(switch
|
(switch
|
||||||
(long "skip-tests" <>
|
(long "skip-tests" <>
|
||||||
help "Skip build and running the test suites")) <*>
|
help "Skip build and running the test suites")) <*>
|
||||||
|
fmap
|
||||||
|
not
|
||||||
|
(switch
|
||||||
|
(long "skip-haddock" <>
|
||||||
|
help "Skip generating haddock documentation")) <*>
|
||||||
switch
|
switch
|
||||||
(long "enable-library-profiling" <>
|
(long "enable-library-profiling" <>
|
||||||
help "Enable profiling when building") <*>
|
help "Enable profiling when building") <*>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user