-
Notifications
You must be signed in to change notification settings - Fork 709
./Setup configure --flags= ...
fails with ghc-8.2.2-rc1
#4808
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@hvr just confirmed that this is a regression relative to 2.0.0.2. |
Closed
I've noticed this occurs on HEAD too; one way to workaround this is the following change to the parser: diff --git a/Cabal/Distribution/Types/GenericPackageDescription.hs b/Cabal/Distribution/Types/GenericPackageDescription.hs
index 1547ade..a278370 100644
--- a/Cabal/Distribution/Types/GenericPackageDescription.hs
+++ b/Cabal/Distribution/Types/GenericPackageDescription.hs
@@ -159,7 +159,7 @@ dispFlagAssignment = Disp.hsep . map (Disp.text . showFlagValue)
-- | Parses a flag assignment.
parsecFlagAssignment :: ParsecParser FlagAssignment
-parsecFlagAssignment = P.sepBy1 (onFlag <|> offFlag) P.skipSpaces1
+parsecFlagAssignment = P.sepBy (onFlag <|> offFlag) P.skipSpaces1
where
onFlag = do
P.optional (P.char '+')
@@ -172,7 +172,7 @@ parsecFlagAssignment = P.sepBy1 (onFlag <|> offFlag) P.skipSpaces1
-- | Parses a flag assignment.
parseFlagAssignment :: Parse.ReadP r FlagAssignment
-parseFlagAssignment = Parse.sepBy1 parseFlagValue Parse.skipSpaces1
+parseFlagAssignment = Parse.sepBy parseFlagValue Parse.skipSpaces1
where
parseFlagValue =
(do Parse.optional (Parse.char '+') Fwiw, |
hvr
added a commit
to hvr/cabal
that referenced
this issue
Oct 18, 2017
phadej
pushed a commit
that referenced
this issue
Oct 26, 2017
This was fixed by #4830. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
The cabal packaged with ghc-8.2.2-rc1 (Cabal commit: c84a3c7) fails when passed Setup configure is passed "--flags=".
See a log here:
https://gist.github.com/duog/260589ccbf63200addbea00f25436a48
The text was updated successfully, but these errors were encountered: