-
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
RFC: change default for logging to +nowrap
#5488
Comments
I don't care that much about this (especially since the default can be overturned), but I slightly prefer wrapped output. |
On my laptop
So current default looks silly, I'm 👍 for |
@hvr I agree with I often see that this solver error confuses beginners. Maybe we can go even further and improve UX of this particular error message? Like, use some fancy ascii symbols. Something like this:
Probably, this format should be discussed more. It's just an idea. |
This introduce a +wrap modifier that make Cabal CLI follows the ancient behavior.
This introduce a +wrap modifier that make Cabal CLI follows the ancient behavior.
This introduce a +wrap modifier that make Cabal CLI follows the ancient behavior.
This introduce a +wrap modifier that make Cabal CLI follows the ancient behavior.
This introduce a +wrap modifier that make Cabal CLI follows the ancient behavior.
This introduce a +wrap modifier that make Cabal CLI follows the ancient behavior.
This introduce a +wrap modifier that make Cabal CLI follows the ancient behavior.
I'm curious what others think about this, hence I'm putting this up for discussion. And being biased, I'm also specifically interested in hearing about reasons why
+nowrap
is undesirable.By default, cabal line-wraps its logging output to hardcoded line-length of 79 characters via
wrapText
:cabal/Cabal/Distribution/Utils/Generic.hs
Lines 108 to 131 in 3b39059
In #4091, a verbosity level modified
+nowrap
was introduced which suppresses this line-wrapping;IMO, having
cabal
pre-linewrap its output interacts badly with terminals or editors if these re-wrap dynamically when resizing the window, readability is IMHO not improved by line-wrapping, and it makes it harder to copy and paste as the terminal can't easily reconstruct the original log message's line endings, and thus the pre-wrapped text is copy-n-pasted into the target including the line-wrapping (which may again not be adequate for the target text-body width).As an example, this here is a solver failure pre-wrapped via
wrapText
...and the same with
+nowrap
:Personally, I consider the
+nowrap
version easier to parse visually, as it retains more of its original structure. I don't have to cognitively unwrap long lines into their original form to unpack the information....opinions?
The text was updated successfully, but these errors were encountered: