Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions exes/BuildClient.hs
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ processPkg verbosity opts config docInfo = do
createDirectoryIfMissing True $ resultsDirectory opts
notice verbosity $ "Writing cabal.project for " ++ display (docInfoPackage docInfo)
let projectFile = installDirectory opts </> "cabal.project"
cabal opts "unpack" [show (docInfoTarGzURI config docInfo)] Nothing
cabal opts "unpack" [cabalPackageTarget config docInfo] Nothing
writeFile projectFile $ "packages: */*.cabal" -- ++ show (docInfoTarGzURI config docInfo)

setTestOutcome :: String -> [String] -> [String]
Expand Down Expand Up @@ -756,14 +756,7 @@ buildPackage verbosity opts config docInfo = do
"--haddock-hoogle",
-- Generate the quickjump index files
"--haddock-option=--quickjump",
-- For candidates we need to use the full URL, because
-- otherwise cabal-install will not find the package.
-- For regular packages however we need to use just the
-- package name, otherwise cabal-install will not
-- generate a report
if docInfoIsCandidate docInfo
then show (docInfoTarGzURI config docInfo)
else display pkgid
cabalPackageTarget config docInfo
]

-- The installDirectory is purely temporary, while the resultsDirectory is
Expand Down Expand Up @@ -830,6 +823,18 @@ cabal opts cmd args moutput = do
Nothing Nothing moutput moutput
waitForProcess ph

cabalPackageTarget :: BuildConfig -> DocInfo -> String
cabalPackageTarget config docInfo =
-- For candidates we need to use the full URL, because
-- otherwise cabal install/unpack will not find the package.
-- For regular packages however we need to use just the
-- package name, otherwise cabal install will not
-- generate a report and cabal unpack will not use the
-- latest cabal file revision from the package archive.
if docInfoIsCandidate docInfo
then show (docInfoTarGzURI config docInfo)
else display (docInfoPackage docInfo)

pruneHaddockFiles :: FilePath -> IO ()
pruneHaddockFiles dir = do
-- Hackage doesn't support the haddock frames view, so remove it
Expand Down
Loading