-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse error on "mixins" field #5150
Comments
Can you test what cabal-install-2.0 does, (e.g. `cabal check`).
…Sent from my iPhone
On 15 Feb 2018, at 21.08, Jude Taylor ***@***.***> wrote:
The mixins field doesn't parse if the provided renaming clause has whitespace after the opening parenthesis.
mixins: example-mixin ( Mixin1 as Foo.Mixin1
, Mixin2 as Foo.Mixin2
)
$ readGenericPackageDescription normal "test.txt"
Warning: test.txt:6:26:
unexpected " "
expecting ")"
example-mixin ( Mixin1 as Foo.Mixin1
, Mixin2 as Foo.Mixin2
)
*** Exception: dieVerbatim: user error (<interactive>: Failed parsing "test.txt".
If I delete the space in ( Mixin1 it parses fine. I feel like the given example should parse correctly since it would make vertically formatted long renaming clauses nicer-looking.
If this isn't intended behavior, I can PR the patch I've made locally.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
As old cabal-install fails too, new lenient parser have to be guarded with `cabal-version` check. We have to be bug compatible :/
…Sent from my iPhone
On 15 Feb 2018, at 21.18, Jude Taylor ***@***.***> wrote:
$ cabal-install version 2.0.0.1
compiled using version 2.0.1.0 of the Cabal library
cabal: ./test.cabal:6: Parse of field 'mixins' failed.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Which version of Cabal is supposed to be able to parse my example? If I specify |
Sorry, what @phadej was saying that it's not enough to just fix the parser, we also have to make sure the fix only applies when you have a sufficiently new @phadej, is this really necessary? It's certainly not a BC-breaking change, which is what I thought |
It mentions the issue of parsing failures caused by the presence of blank spaces after opening parentheses. See haskell#5150, haskell#5292, haskell#5293.
Was this fixed in #5293 ? |
The
mixins
field doesn't parse if the provided renaming clause has whitespace after the opening parenthesis.If I delete the space in
( Mixin1
it parses fine. I feel like the given example should parse correctly since it would make vertically formatted long renaming clauses nicer-looking.If this isn't intended behavior, I can PR the patch I've made locally.
The text was updated successfully, but these errors were encountered: