Skip to content

Commit 785127c

Browse files
authored
Merge pull request #3039 from commercialhaskell/3035-fix-unnecessary-rebuild
Fix a case of unnecessary dependency rebuilding #3035
2 parents 6aa9f7a + 32c128a commit 785127c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Stack/Package.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,11 @@ getBuildComponentDir (Just name) = parseRelDir (name FilePath.</> (name ++ "-tmp
515515

516516
-- | Get all dependencies of the package (buildable targets only).
517517
packageDependencies :: PackageDescription -> Map PackageName VersionRange
518-
packageDependencies =
519-
M.fromListWith intersectVersionRanges .
520-
concatMap (fmap (depName &&& depRange) .
521-
targetBuildDepends) .
522-
allBuildInfo'
518+
packageDependencies pkg =
519+
M.fromListWith intersectVersionRanges $
520+
map (depName &&& depRange) $
521+
concatMap targetBuildDepends (allBuildInfo' pkg) ++
522+
maybe [] setupDepends (setupBuildInfo pkg)
523523

524524
-- | Get all build tool dependencies of the package (buildable targets only).
525525
packageToolDependencies :: PackageDescription -> Map Text VersionRange

src/Stack/Types/BuildPlan.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ instance Store MiniBuildPlan
434434
instance NFData MiniBuildPlan
435435

436436
miniBuildPlanVC :: VersionConfig MiniBuildPlan
437-
miniBuildPlanVC = storeVersionConfig "mbp-v1" "C8q73RrYq3plf9hDCapjWpnm_yc="
437+
miniBuildPlanVC = storeVersionConfig "mbp-v2" "C8q73RrYq3plf9hDCapjWpnm_yc="
438438

439439
-- | Information on a single package for the 'MiniBuildPlan'.
440440
data MiniPackageInfo = MiniPackageInfo

0 commit comments

Comments
 (0)