Skip to content

Commit

Permalink
Merge pull request #3039 from commercialhaskell/3035-fix-unnecessary-…
Browse files Browse the repository at this point in the history
…rebuild

Fix a case of unnecessary dependency rebuilding #3035
  • Loading branch information
borsboom committed Mar 8, 2017
2 parents 6aa9f7a + 32c128a commit 785127c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Stack/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,11 @@ getBuildComponentDir (Just name) = parseRelDir (name FilePath.</> (name ++ "-tmp

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

-- | Get all build tool dependencies of the package (buildable targets only).
packageToolDependencies :: PackageDescription -> Map Text VersionRange
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Types/BuildPlan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ instance Store MiniBuildPlan
instance NFData MiniBuildPlan

miniBuildPlanVC :: VersionConfig MiniBuildPlan
miniBuildPlanVC = storeVersionConfig "mbp-v1" "C8q73RrYq3plf9hDCapjWpnm_yc="
miniBuildPlanVC = storeVersionConfig "mbp-v2" "C8q73RrYq3plf9hDCapjWpnm_yc="

-- | Information on a single package for the 'MiniBuildPlan'.
data MiniPackageInfo = MiniPackageInfo
Expand Down

0 comments on commit 785127c

Please sign in to comment.