Skip to content

Commit fc85535

Browse files
committed
Temporarily disallow constraints that have build tool dependency qualifiers.
This commit comments out the part of haskell#4219 that parses build tool dependency qualifiers, to disable the feature until we finalize the syntax. It also comments out the part of haskell#4236 that tests the parsing.
1 parent 60ca093 commit fc85535

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

cabal-install/Distribution/Client/Targets.hs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -746,12 +746,15 @@ instance Text UserConstraint where
746746
do _ <- Parse.string ":setup."
747747
pn2 <- parse
748748
return (UserSetup pn, pn2)
749-
+++
750-
do _ <- Parse.string ":"
751-
pn2 <- parse
752-
_ <- Parse.string ":exe."
753-
pn3 <- parse
754-
return (UserExe pn pn2, pn3)
749+
750+
-- -- TODO: Re-enable parsing of UserExe once we decide on a syntax.
751+
--
752+
-- +++
753+
-- do _ <- Parse.string ":"
754+
-- pn2 <- parse
755+
-- _ <- Parse.string ":exe."
756+
-- pn3 <- parse
757+
-- return (UserExe pn pn2, pn3)
755758

756759
-- Package property
757760
let keyword str x = Parse.skipSpaces1 >> Parse.string str >> return x

cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,9 @@ instance Arbitrary RemoteRepo where
568568
instance Arbitrary UserQualifier where
569569
arbitrary = oneof [ pure UserToplevel
570570
, UserSetup <$> arbitrary
571-
, UserExe <$> arbitrary <*> arbitrary
571+
572+
-- -- TODO: Re-enable UserExe tests once we decide on a syntax.
573+
-- , UserExe <$> arbitrary <*> arbitrary
572574
]
573575

574576
instance Arbitrary UserConstraint where

cabal-install/tests/UnitTests/Distribution/Client/Targets.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import Distribution.ParseUtils (parseCommaList)
1212
import Distribution.Text (parse)
1313

1414
import Distribution.Solver.Types.PackageConstraint (PackageProperty(..))
15-
import Distribution.Solver.Types.OptionalStanza (OptionalStanza(..))
1615

1716
import Test.Tasty
1817
import Test.Tasty.HUnit
@@ -63,9 +62,11 @@ exampleConstraints =
6362
(fn "bar", False),
6463
(fn "baz", True)]))
6564

66-
, ("foo:happy:exe.template-haskell test",
67-
UserConstraint (UserExe (pn "foo") (pn "happy")) (pn "template-haskell")
68-
(PackagePropertyStanzas [TestStanzas]))
65+
-- -- TODO: Re-enable UserExe tests once we decide on a syntax.
66+
--
67+
-- , ("foo:happy:exe.template-haskell test",
68+
-- UserConstraint (UserExe (pn "foo") (pn "happy")) (pn "template-haskell")
69+
-- (PackagePropertyStanzas [TestStanzas]))
6970
]
7071
where
7172
pn = mkPackageName

0 commit comments

Comments
 (0)