File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ checkBuildCache pkgName oldCache files = do
512512 -- Filter out the cabal_macros file to avoid spurious recompilations
513513 go fp _ _ | takeFileName fp == " cabal_macros.h" = pure (Set. empty, Map. empty)
514514 -- Filter out the Paths_<pkg name> file to avoid spurious recompilations
515- go fp _ _ | takeFileName fp == " Paths_ " ++ packageNameString pkgName ++ " .hs " = pure (Set. empty, Map. empty)
515+ go fp _ _ | takeFileName fp == pathsFile = pure (Set. empty, Map. empty)
516516 -- Common case where it's in the cache and on the filesystem.
517517 go fp (Just digest') (Just fci)
518518 | fci. hash == digest' = pure (Set. empty, Map. singleton fp fci)
@@ -524,6 +524,14 @@ checkBuildCache pkgName oldCache files = do
524524 go fp (Just digest') Nothing =
525525 pure (Set. singleton fp, Map. singleton fp $ FileCacheInfo digest')
526526
527+ pathsFile =
528+ " Paths_" ++ map fixPathsFileChar (packageNameString pkgName) ++ " .hs"
529+
530+ -- cabal doesn't currently expose this logic from
531+ -- Distribution.Simple.Build.PathsModule
532+ fixPathsFileChar ' -' = ' _'
533+ fixPathsFileChar c = c
534+
527535-- | Returns entries to add to the build cache for any newly found unlisted
528536-- modules
529537addUnlistedToBuildCache ::
You can’t perform that action at this time.
0 commit comments