Skip to content
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

Curly braces in the description field #6297

Closed
mniip opened this issue Oct 15, 2019 · 3 comments
Closed

Curly braces in the description field #6297

mniip opened this issue Oct 15, 2019 · 3 comments

Comments

@mniip
Copy link

mniip commented Oct 15, 2019

When uploading my package to hackage (notably, cannot reproduce with cabal locally), it complains:

partial-records-0.1.0.0/partial-records.cabal:38:0: [v2.0] unexpected span: "|]"

The relevant line is:

...
description:         .                                                          
  ...                     
  > mkFromPartial "mkFoo" [t|Foo|] [|Foo { fld1 = Nothing, fld2 = Nothing }|]
  ...

The issue is only reproducible if } is not the last character on the line. Anything after the } gets reported in the error. This makes me think this is related to #774

My cabal version is:

cabal-install version 2.4.0.0
compiled using version 2.4.0.1 of the Cabal library 

but as I said I was unable to reproduce this locally in any form, only when uploading to hackage.

@phadej
Copy link
Collaborator

phadej commented Oct 15, 2019

I assume this is the complete file:

partial-records.cabal.txt

@mniip
Copy link
Author

mniip commented Oct 15, 2019

Sure that works as an example.

@phadej
Copy link
Collaborator

phadej commented Oct 15, 2019

This is not a Cabal bug.

When the package is uploaded to Hackage, Hackage uses also older versions of .cabal format parsers, to verify that old cabal-installs / tools using old Cabal libraries can handle it.

However, if you bump to cabal-version: 2.4 (the one you tested), the upload should surely work.

#744 is fixed in 2.2, so cabal-version: 2.2 should work too.


(warnings due testing only with a single .cabal file, not whole package)

partial-records % /opt/cabal/2.4/bin/cabal check
Warning: The following warnings are likely to affect your build negatively:
...
Warning: Hackage would reject this package.
partial-records % /opt/cabal/2.2/bin/cabal check
The following warnings are likely to affect your build negatively:
...
Hackage would reject this package.
partial-records % /opt/cabal/2.0/bin/cabal check
cabal: ./partial-records.cabal:46: unexpected span: "|]"

@phadej phadej closed this as completed Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants