-
Notifications
You must be signed in to change notification settings - Fork 710
Fix #5488: change default for logging to +nowrap
#9160
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
base: master
Are you sure you want to change the base?
Conversation
b483884
to
69b65ef
Compare
@yvan-sraka good initiative! Would you mind showing us what it looks like before and after? :) |
Yes! It's highlighted in the linked issue #5488 |
62df668
to
7946b4e
Compare
🤔 this does not just flip a default setting right? If the default is Also, I am not sure adding a new constructor to
What would this last verbosity mean? |
This introduce a +wrap modifier that make Cabal CLI follows the ancient behavior.
Thanks, @andreabedini! I updated the PR (removing the Also, since I couldn't test it, it will be only by guessing … But I believe the final behavior will be that, e.g., |
I have paired with Yvan and It is not clear how displayException uses the wrapping CLI options. (typeclass methods don't help, but it seems like it is called by For those interested, here is the profiling log that was generated. The labyrinthine code of cabal makes it surprisingly difficult to apply such a small change. |
@Kleidukos @yvan-sraka is this of any help? cabal/Cabal/src/Distribution/Simple/Utils.hs Line 292 in dea70fb
|
I'll try to rephrase and better explain my bug, so I will find help in solving it: The TLDR of #9160 (comment) is that I realized that after my changes that now the output is unwrapped by default (what I want) but I can't wrap it anymore (with a verbosity modifier) which is a bug ... The commands I'm using to experiment are to compare the output of But last time I ran my tests, I got After that, to sum up what we discover with @Kleidukos, is that https://github.com/haskell/cabal/blob/master/Cabal/src/Distribution/Simple/Utils.hs#L662 seems to never be called (while https://github.com/haskell/cabal/blob/master/Cabal/src/Distribution/Verbosity.hs#L202 is called), and I don't understand why ... maybe some hint on how to use the Cabal REPL to debug that (is there a documentation somewhere on that?) could help! 🙂 Thanks in advance to anyone that could help me better understand what happens here! |
This PR modifies
cabal
behavior by change default for logging to+nowrap
and so it introduces a+wrap
modifier :)Checklist:
QA notes:
Quoting the linked issue #5488, this PR brings visual differences in the solver output, as an example, this here is a solver failure pre-wrapped via
wrapText
:...and the same with
+nowrap
(the new default that this PR introduce):