-
Notifications
You must be signed in to change notification settings - Fork 842
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
stack sdist (2.3.1) generates weird PVP bounds in .cabal file #5289
Comments
Affects me too, I'll have to rollback to the older stack to publish new package. |
@snoyberg Can you please confirm whether this is intended behaviour or bug and in case of bug, it it's problem of stack or rather hpack? Have no idea what causes this, but it's pretty unfortunate as I'm unable to generate working tarball with |
Most likely it's a big in the Cabal library. We use its pretty printer, and it's been buggy in the past. I'd recommend turning off the pvp-bounds option. Due to these kinds of Cabal bugs, I've considered removing the feature |
The issue is in how stack uses the Cabal library – please see the PR #5309 linked above for the fix. |
Given that #5309 was merged, does that close this issue? |
@sullyj3 I think so, yes. The fix is called out in https://github.com/commercialhaskell/stack/blob/master/ChangeLog.md#v233. |
Thanks for the ping, closing |
General summary/comments (optional)
For my haskell project I use stack for building & generating tarball for Hackage. To generate PVP bounds in resulting
.cabal
file, I use thepvp-bounds: lower
option in mystack.yaml
. Everything worked fine withstack-2.1.3
, but after upgrading tostack-2-3-1
, runningstack sdist
results in following error:When checking the generated
.cabal
file, I noticed that version bounds in dependencies section looks like this:Note the
{}
which probably causes the issue. I tried to use Cabal 3 as suggested by changing several things in mypackage.yaml
file gist, which suppresed all the warnings, but these{}
remains in the generated.cabal
file inside the distribution tarball. When trying to upload such tar to Hackage, it ends up with following error:Is this expected behaviour, or is it either stack or hpack bug or error in my configuration? Either way, I'm not able to generate valid distribution tarball for Hackage using
stack-2.3.1
.Steps to reproduce
For example:
stack sdist
inside the project directoryExpected
.tar.gz
distribution file that would be accepted by Hackage (as withstack-2.1.3
)Actual
Generated
.tar.gz
contains (probably) invalid syntax in.cabal
file.Stack version
Method of installation
The text was updated successfully, but these errors were encountered: