Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building haddocks for packages with internal libraries #4596

Merged
merged 1 commit into from
Feb 19, 2019
Merged
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
10 changes: 5 additions & 5 deletions src/Stack/Build/Haddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Data.Time (UTCTime)
import Path
import Path.Extra
import Path.IO
import RIO.List (intercalate)
import RIO.PrettyPrint
import Stack.Constants
import Stack.PackageDump
Expand Down Expand Up @@ -235,18 +236,17 @@ generateHaddockIndex descr wc bco dumpPackages docRelFP destDir = do
docRelFP FP.</>
packageIdentifierString dpPackageIdent FP.</>
(packageNameString name FP.<.> "haddock")
interfaces = intercalate "," $
maybeToList dpHaddockHtml ++ [srcInterfaceFP]

destInterfaceAbsFile <- parseCollapsedAbsFile (toFilePath destDir FP.</> destInterfaceRelFP)
esrcInterfaceModTime <- tryGetModificationTime srcInterfaceAbsFile
return $
case esrcInterfaceModTime of
Left _ -> Nothing
Right srcInterfaceModTime ->
Just
( [ "-i"
, concat
[ docRelFP FP.</> packageIdentifierString dpPackageIdent
, ","
, destInterfaceRelFP ]]
( [ "-i", interfaces ]
, srcInterfaceModTime
, srcInterfaceAbsFile
, destInterfaceAbsFile )
Expand Down