skip-hoogle options

This commit is contained in:
Michael Snoyman 2015-03-18 15:45:54 +02:00
parent d0138fae7a
commit 076c477905
5 changed files with 28 additions and 8 deletions

View File

@ -1,6 +1,7 @@
## 0.6.1
* Switch to V2 upload by default
* --skip-hoogle option
## 0.6.0

View File

@ -42,6 +42,7 @@ data BuildFlags = BuildFlags
, bfSkipCheck :: !Bool
, bfUploadV1 :: !Bool
, bfServer :: !StackageServer
, bfBuildHoogle :: !Bool
} deriving (Show)
data BuildType = Nightly | LTS BumpType
@ -221,6 +222,7 @@ getPerformBuild buildFlags Settings {..} = PerformBuild
, pbEnableExecDyn = bfEnableExecDyn buildFlags
, pbVerbose = bfVerbose buildFlags
, pbAllowNewer = bfSkipCheck buildFlags
, pbBuildHoogle = bfBuildHoogle buildFlags
}
-- | Make a complete plan, build, test and upload bundle, docs and

View File

@ -33,6 +33,7 @@ data InstallFlags = InstallFlags
, ifEnableExecDyn :: !Bool
, ifVerbose :: !Bool
, ifSkipCheck :: !Bool
, ifBuildHoogle :: !Bool
} deriving (Show)
-- | Source for build plan.
@ -55,6 +56,7 @@ getPerformBuild plan InstallFlags{..} =
, pbEnableExecDyn = ifEnableExecDyn
, pbVerbose = ifVerbose
, pbAllowNewer = ifSkipCheck
, pbBuildHoogle = ifBuildHoogle
}
-- | Install stackage from an existing build plan.

View File

@ -69,6 +69,10 @@ data PerformBuild = PerformBuild
, pbVerbose :: Bool
, pbAllowNewer :: Bool
-- ^ Pass --allow-newer to cabal configure
, pbBuildHoogle :: Bool
-- ^ Should we build Hoogle database?
--
-- May be disabled due to: https://ghc.haskell.org/trac/ghc/ticket/9921
}
data PackageInfo = PackageInfo
@ -421,12 +425,13 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} =
, "/,"
, fpToText hf
]
args = "haddock"
: "--hyperlink-source"
: "--html"
: "--hoogle"
: "--html-location=../$pkg-$version/"
: hfsOpts
args = ($ hfsOpts) $ execWriter $ do
let tell' x = tell (x:)
tell' "haddock"
tell' "--hyperlink-source"
tell' "--html"
when pbBuildHoogle $ tell' "--hoogle"
tell' "--html-location=../$pkg-$version/"
eres <- tryAny $ run "cabal" args

View File

@ -116,7 +116,12 @@ main =
(long "server-url" <>
metavar "SERVER-URL" <>
showDefault <> value (T.unpack $ unStackageServer def) <>
help "Server to upload bundle to")))
help "Server to upload bundle to"))) <*>
fmap
not
(switch
(long "skip-hoogle" <>
help "Skip generating Hoogle input files"))
nightlyUploadFlags = fromString <$> strArgument
(metavar "DATE" <>
@ -178,7 +183,12 @@ main =
help "Output verbose detail about the build steps") <*>
switch
(long "skip-check" <>
help "Skip the check phase, and pass --allow-newer to cabal configure")
help "Skip the check phase, and pass --allow-newer to cabal configure") <*>
fmap
not
(switch
(long "skip-hoogle" <>
help "Skip generating Hoogle input files"))
uploadv2 (path, url) = withManager tlsManagerSettings $ \man -> do
token <- getStackageAuthToken