-
Notifications
You must be signed in to change notification settings - Fork 841
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
upload with lower pvp-bounds removes things in 1.6.0 #3549
Comments
Note that this is a warning instead of an error because for upload, in most cases the cabal check step will fail, and it may be helpful to still be able to inspect an sdist tarball.
Looks like this is an upstream bug in Cabal, I have opened haskell/cabal#4863 with a repro. This version of stack now depends on Cabal 2.0 rather than Cabal 1.24. One of the big changes that has made the release long to allow for fixes. Since stack-1.6 will be released imminently, I don't think there will be time for this to be fixed and a new version of it released. So, in order to make this clearer in the future, I have pushed a change which adds the following warning: |
Thanks for digging into this @mgsloan!!! |
@mfine No problem! Based on the discussion in haskell/cabal#4863 , it sounds like this is fixed in development versions of Cabal. However, there are various experimental features that might change, and they are migrating to a new parser. It may still be worth a shot to try out:
Since there's a fix in Cabal development version, I've updated the output:
|
I don't think this is a Cabal 2.0 bug specifically. I can reproduce this with Cabal-1.24.2.0 itself. Any workarounds for upload to hackage ? |
@psibi I believe if you modify stack.yaml in stack repo to use Cabal from git, this should work. Might need to fix build errors if APIs changed. May be helpful to publish a branch with this change, others might benefit from it. |
Just to update this issue with conclusions from elsewhere:
I think the takeaway here is simply that pvp-bounds will be unusable in Stack 1.6, and will continue to be unusable until a patched version of Cabal is officially released. |
This looks resolved! With 1.6.5:
With 1.7.0.1:
The cabal stanzas for library and executable look fixed too: With 1.6.5:
With 1.7.0.1:
Thanks! Feel free to close if you think this is also resolved. |
Awesome, thanks for checking on this! |
General summary/comments
Uploading with
pvp-bounds: lower
is removing things from the cabal file in 1.6.0.Steps to reproduce
Publish a package to hackage containing an executable with a dependency on the package's library with a stack.yaml containing
pvp-bounds: lower
.Expected
I expected the bounds to be set on the dependencies for the executable.
Actual
There were missing fields:
Before:
After:
Missing
default-language
,ghc-options
, andbuild-depends
.Here's the verbose output of sdist:
Stack version
See above ^^^.
Method of installation
Installed from HEAD.
The text was updated successfully, but these errors were encountered: