-
Notifications
You must be signed in to change notification settings - Fork 696
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 about missing upper bounds #8291
Comments
|
Then tell them to stop sending emails about version bounds. They made my colleague upset. 😔 |
Thanks for bringing this to our attention. Let me check how the whole process is set up, I will get back to you as soon as I have a proposal. |
A way to introduce this could be by adding a cabal/Cabal/src/Distribution/PackageDescription/Check.hs Lines 108 to 110 in af25861
If there is some consensus, I could check how this warning would impact people using |
Yes, definitely let's discuss. I wonder what the warnings are used for, so far. |
On |
Also notice how we already check for upper bounds in cabal/Cabal/src/Distribution/PackageDescription/Check.hs Lines 2124 to 2131 in 207d4ee
with |
Related: #5317 (opened in 2018). |
A more sophisticated version of it is asked for in #1703 |
I'd go with a simple add any upper bound to all dependencies, and point to |
@jappeace: most of "them" were and are volunteers and most of "them" could figure out 20 such things a day, if that was their own single-user project and they could focus on exclusively it and didn't need to forge consensus. |
sorry it wasn't my intention to doubt the competence of the maintainers, |
Oh, fair enough. thank you. No opinion on #1703, but I do believe in baby steps and getting things humbly done. What do you think @ffaf1 and @ulysses4ever? |
I'm a big fan of do the simple thing first. I'm not sure if this warning should be on by default or hidden behind a flag (e.g. |
I agree with “simple things first”. With the new and improved™ structured errors, a third party tool (e.g. I would personally not hide it behind a flag, for UX reasons. I would be pretty miffed to invoke If @jappeace wants to take a stab at it, this is a good place where to start: cabal/Cabal/src/Distribution/PackageDescription/Check.hs Lines 1823 to 1824 in 2353627
|
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages.
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably)
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably)
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably) wait what? move toDependencyVersionsMap to utils section add nicer error message simplify checking logic, add more comments only emit missing upper bounds if bigger then one don't add bound to internal libraries filter out self from the dependency map I think this is an external library so it needs an upper bound now? add test for multilib fix test suite by ignoring the warning ... probably not the best approach change link to pvp instead of parsonsmatt better wording on missing upper bound error remove spurious parenthesis change map creation from monad to list comprehension use foldmap to get rid of maybe, fix compile error rewrite from do notation to list comprehension fix test suite failing
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably) wait what? move toDependencyVersionsMap to utils section add nicer error message simplify checking logic, add more comments only emit missing upper bounds if bigger then one don't add bound to internal libraries filter out self from the dependency map I think this is an external library so it needs an upper bound now? add test for multilib fix test suite by ignoring the warning ... probably not the best approach change link to pvp instead of parsonsmatt better wording on missing upper bound error remove spurious parenthesis change map creation from monad to list comprehension use foldmap to get rid of maybe, fix compile error rewrite from do notation to list comprehension fix test suite failing fix compile error factor out double filter call in a && expression
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably) wait what? move toDependencyVersionsMap to utils section add nicer error message simplify checking logic, add more comments only emit missing upper bounds if bigger then one don't add bound to internal libraries filter out self from the dependency map I think this is an external library so it needs an upper bound now? add test for multilib fix test suite by ignoring the warning ... probably not the best approach change link to pvp instead of parsonsmatt better wording on missing upper bound error remove spurious parenthesis change map creation from monad to list comprehension use foldmap to get rid of maybe, fix compile error rewrite from do notation to list comprehension fix test suite failing fix compile error factor out double filter call in a && expression
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably) wait what? move toDependencyVersionsMap to utils section add nicer error message simplify checking logic, add more comments only emit missing upper bounds if bigger then one don't add bound to internal libraries filter out self from the dependency map I think this is an external library so it needs an upper bound now? add test for multilib fix test suite by ignoring the warning ... probably not the best approach change link to pvp instead of parsonsmatt better wording on missing upper bound error remove spurious parenthesis change map creation from monad to list comprehension use foldmap to get rid of maybe, fix compile error rewrite from do notation to list comprehension fix test suite failing fix compile error factor out double filter call in a && expression
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably) wait what? move toDependencyVersionsMap to utils section add nicer error message simplify checking logic, add more comments only emit missing upper bounds if bigger then one don't add bound to internal libraries filter out self from the dependency map I think this is an external library so it needs an upper bound now? add test for multilib fix test suite by ignoring the warning ... probably not the best approach change link to pvp instead of parsonsmatt better wording on missing upper bound error remove spurious parenthesis change map creation from monad to list comprehension use foldmap to get rid of maybe, fix compile error rewrite from do notation to list comprehension fix test suite failing fix compile error factor out double filter call in a && expression
fixes haskell#8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably) wait what? move toDependencyVersionsMap to utils section add nicer error message simplify checking logic, add more comments only emit missing upper bounds if bigger then one don't add bound to internal libraries filter out self from the dependency map I think this is an external library so it needs an upper bound now? add test for multilib fix test suite by ignoring the warning ... probably not the best approach change link to pvp instead of parsonsmatt better wording on missing upper bound error remove spurious parenthesis change map creation from monad to list comprehension use foldmap to get rid of maybe, fix compile error rewrite from do notation to list comprehension fix test suite failing fix compile error factor out double filter call in a && expression
* Add check for upper bound on any package fixes #8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably) wait what? move toDependencyVersionsMap to utils section add nicer error message simplify checking logic, add more comments only emit missing upper bounds if bigger then one don't add bound to internal libraries filter out self from the dependency map I think this is an external library so it needs an upper bound now? add test for multilib fix test suite by ignoring the warning ... probably not the best approach change link to pvp instead of parsonsmatt better wording on missing upper bound error remove spurious parenthesis change map creation from monad to list comprehension use foldmap to get rid of maybe, fix compile error rewrite from do notation to list comprehension fix test suite failing fix compile error factor out double filter call in a && expression * set expectation * Modify test so it gives a list of expected libs rename public-multilib-3 to all-upper-bound the test had little to do with multilib. * Update comment on ignoring warnigns * use map instead of if * Undo map change add comment on why that doesn't work * Add description and maintainer fields * make description longer then synopsis in all-upper-bound.cabal
According to the pvp we should specify upperbounds for all dependencies.
Since hackage in the future intents to reject packages without tight upper bounds on dependencies,
it's prudent that cabal check gives a warning for this.
The text was updated successfully, but these errors were encountered: