-
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
'cabal check' should warn when there are no upper bounds in setup-depends #4683
Comments
As discussed on IRC, it'd also make sense to validate that the lower bound on lib:Cabal is consistent with the spec-version specified in the .cabal file. |
#3751 is related to this. |
If you review&accept my #4701, then I'd like to tackle this as a follow-up ;) (yet, if it's for 2.0.1, then situation is tricker :( ) |
Note:
here I know that omitting upper bounds on Cabal is safe. Cabal dependency is needed because of #4288 |
I'm going to work on this |
* Introduce checks for upper dependencies in setup. setup depends are now checked for having upper dependencies. Upper bounds are mandatory for base and Cabal libraries, and are optional (but emit warning) for other libraries. Implicit dependencies are not being checked. * Add tests. * Fix tests. * add changelog * fix test for the newer cabal_raw' * scale down alerts: no warnings on any package, only errors on base+Cabal * address review comments * typo * improve changelog (add Cabal) * remove boundedAbove and use Distribution.Version.hasUpperBound instead Co-authored-by: Alexander Vershilov <alexander.vershilov@gmail.com> Co-authored-by: Emily Pillmore <emilypi@cohomolo.gy> Co-authored-by: Mikolaj Konarski <mikolaj@well-typed.com>
Right. High time. :) Thank you again, @ulysses4ever, @qnikst and everybody who took part in the struggle. |
Thanks a lot @Mikolaj for helping out with it! |
wxc
has the followingcustom-setup
section:That is, it says that its setup.hs works with any version of Cabal. However, it is lying - it actually fails to build against Cabal 2. We should warn about such obviously incorrect
setup-depends
and maybe even auto-rewrite the constraint on Cabal to < 2.The text was updated successfully, but these errors were encountered: