-
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
Fix #6290: gen-bounds: do not report empty set of generated bounds #8392
Conversation
Trouble building or running? https://github.com/haskell/cabal/tree/master/cabal-testsuite |
Well, the problem is that the test is skipped with message
How do I get it to not skip the test? |
de00057
to
eb73b56
Compare
(Digression: Do we really want to error out on unused imports? CI has -Werror=unused-imports.
https://github.com/haskell/cabal/runs/7885759782?check_suite_focus=true#step:11:1300.) |
If so, we probably do? I hope that's mentioned in CONTRIBUTING, |
Thanks! Passing
Any more tricks in the sleve to get around this? P.S.: I didn't consider |
Oh, so that may be why all cabal commands accept all possible nonsensical arguments. Should we tweak
I guess, a good default would be |
In other words, I wonder if we should make the test suite more user friendly and more insistently nudging the user in the right direction in its messaging. I certainly fall for this at times. |
@Mikolaj wrote:
No, I wouldn't go in this direction, rather the opposite: always at least warn about non-sensical arguments. So, impov, the current behavior is correct. I am just surprised that my test fails, while a similar test for cabal/cabal-testsuite/src/Test/Cabal/Prelude.hs Lines 283 to 294 in e1f5d8b
Casing on strings? Why isn't the "command"-argument for cabal invokation drawn from an abstract data type? This makes me age quickly. I got someone to blame for my grey hairs... And blame even says that I just edited this part in October, with no recollection of it now... Thanks to your help, friends, I succeeded with the test locally now! Shipping to CI... |
eb73b56
to
0e2a506
Compare
@Mikolaj wrote:
That would be terrific, yes! @ulysses4ever wrote:
Would be greatly appreciated, could be done on demand. |
One more problem: My current test is apparently pointless, because
So, should the regular output be marked here? Or is it even better if the "Congratulations" message goes to What confuses me is that
To wrap up my musings: |
No idea, but let's please open the 3 or more issues mentioned above. They seem to make a lot of sense. |
Further research:
So, I suppose it is intended to wrap the output, only it isn't implemented for all commands. |
The proper way to print stuff is not a naive `putStrLn`, but using one of the methods from Distribution.Simple.Utils, like `notice verbosity`.
To answer my own question: use |
CI is green, the test is meaningful, please review! |
@Mikolaj wrote:
Done, or did I miss one? |
This bit maybe? As vague as it sounds?
|
I'd be happy if this merged soon, because I want to continue and fix the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Minor comments are left to your discretion.
depName :: Dependency -> String | ||
depName (Dependency pn _ _) = unPackageName pn | ||
if null thePkgs then notice verbosity | ||
"Congratulations, all your dependencies have upper bounds!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Congratulations, all your dependencies have upper bounds!" | |
"Congratulations, all your external dependencies have upper bounds!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to change the good behaviors of cabal gen-bounds
in this PR.
Hypothetically, someone might have a script using cabal gen-bounds
and match the "Congratulations" message exactly.
But let's keep it in mind for an overhaul of cabal gen-bounds
.
The proper way to print stuff is not a naive `putStrLn`, but using one of the methods from Distribution.Simple.Utils, like `notice verbosity`.
3e89d2d
to
f9520d5
Compare
The proper way to print stuff is not a naive `putStrLn`, but using one of the methods from Distribution.Simple.Utils, like `notice verbosity`.
f9520d5
to
6e88865
Compare
The proper way to print stuff is not a naive `putStrLn`, but using one of the methods from Distribution.Simple.Utils, like `notice verbosity`.
6e88865
to
cfbfe82
Compare
The proper way to print stuff is not a naive `putStrLn`, but using one of the methods from Distribution.Simple.Utils, like `notice verbosity`.
cfbfe82
to
019eec0
Compare
The proper way to print stuff is not a naive `putStrLn`, but using one of the methods from Distribution.Simple.Utils, like `notice verbosity`.
019eec0
to
d9a769f
Compare
The proper way to print stuff is not a naive `putStrLn`, but using one of the methods from Distribution.Simple.Utils, like `notice verbosity`.
Fix #6290:
hasElem
.Utils
module I couldn't abstain from...I didn't manage to run my test locally, how does this work again?