File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
cabal-install-solver/src/Distribution/Solver/Types
cabal-install/src/Distribution/Client Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import Distribution.Solver.Types.OptionalStanza
3030import Distribution.Solver.Types.PackagePath
3131
3232import qualified Text.PrettyPrint as Disp
33- import Distribution.Solver.Types.Toolchain (Stage )
33+ import Distribution.Solver.Types.Toolchain (Stage ( Host ) )
3434
3535
3636-- | Determines to what packages and in what contexts a
@@ -67,9 +67,9 @@ data ConstraintQualifier
6767
6868-- | Constructor for a common use case: the constraint applies to
6969-- the package with the specified name when that package is a
70- -- top-level dependency in the default namespace .
70+ -- top-level dependency in the host stage .
7171scopeToplevel :: PackageName -> ConstraintScope
72- scopeToplevel = ConstraintScope Nothing . ScopeQualified QualToplevel
72+ scopeToplevel = ConstraintScope ( Just Host ) . ScopeQualified QualToplevel
7373
7474-- | Returns the package name associated with a constraint scope.
7575scopeToPackageName :: ConstraintScope -> PackageName
Original file line number Diff line number Diff line change @@ -1410,7 +1410,9 @@ planPackages
14101410 , not (null stanzas)
14111411 ]
14121412 . addConstraints
1413- -- enable stanza constraints where the user asked to enable
1413+ -- Enable stanza constraints where the user asked to enable
1414+ -- Only applies to the host stage.
1415+ -- TODO: Disable test and bench for build stage packages.
14141416 [ LabeledPackageConstraint
14151417 ( PackageConstraint
14161418 (scopeToplevel pkgname)
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ pkgSpecifierConstraints (SpecificSourcePackage pkg) =
5252 where
5353 pc =
5454 PackageConstraint
55- (ConstraintScope Nothing ( ScopeTarget $ packageName pkg))
55+ (scopeToplevel ( packageName pkg))
5656 (PackagePropertyVersion $ thisVersion (packageVersion pkg))
5757
5858mkNamedPackage :: PackageIdentifier -> PackageSpecifier pkg
You can’t perform that action at this time.
0 commit comments