File tree 1 file changed +10
-2
lines changed
cabal-install/Distribution/Client 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -967,8 +967,16 @@ elaborateInstallPlan platform compiler compilerprogdb
967
967
pkgDependencies = deps
968
968
pkgStanzasAvailable = Set. fromList stanzas
969
969
pkgStanzasRequested =
970
- Map. fromList $ [ (TestStanzas , v) | v <- maybeToList tests ]
971
- ++ [ (BenchStanzas , v) | v <- maybeToList benchmarks ]
970
+ -- NB: even if a package stanza is requested, if the package
971
+ -- doesn't actually have any of that stanza we omit it from
972
+ -- the request, to ensure that we don't decide that this
973
+ -- package needs to be rebuilt. (It needs to be done here,
974
+ -- because the ElaboratedConfiguredPackage is where we test
975
+ -- whether or not there have beenc hanges.)
976
+ Map. fromList $ [ (TestStanzas , v) | v <- maybeToList tests
977
+ , _ <- PD. testSuites pkgDescription ]
978
+ ++ [ (BenchStanzas , v) | v <- maybeToList benchmarks
979
+ , _ <- PD. benchmarks pkgDescription ]
972
980
where
973
981
tests , benchmarks :: Maybe Bool
974
982
tests = perPkgOptionMaybe pkgid packageConfigTests
You can’t perform that action at this time.
0 commit comments