Skip to content
Snippets Groups Projects
Commit e78c7ef9 authored by Zubin's avatar Zubin
Browse files

haddock: oneshot tests can drop files if they share modtimes. Stop this by

including the filename in the key.

Ideally we would use `ghc -M` output to do a proper toposort

Partially addresses #25372
parent c6dd5542
No related branches found
No related tags found
No related merge requests found
......@@ -156,7 +156,7 @@ runHaddock cfg@(Config{..}) = do
files <- filter ((== ".hi") . takeExtension) <$> listDirectory hiDir
-- Use the output order of GHC as a simple dependency order
filesSorted <- Map.elems . Map.fromList <$> traverse (\file -> (,file) <$> getModificationTime (hiDir </> file)) files
filesSorted <- Map.elems . Map.fromList <$> traverse (\file -> (\mt -> ((mt,file),file)) <$> getModificationTime (hiDir </> file)) files
let srcRef = if "--hyperlinked-source" `elem` cfgHaddockArgs then ",src,visible," else ""
loop [] = pure True
loop (file : files) = do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment