-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Prettier warning output #18288
Prettier warning output #18288
Conversation
ac34427
to
dbc1ded
Compare
My vote is (4) - thank you by the way for trying this, didn't know removing the leftover "rank_zero_only(" was possible - because a large percentage of terminals (if not most) will autowrap by default. And those who don't have it configured probably like that their lines do not wrap. One more suggestion from me would be to remove the warning category. We only use |
4639955
to
31114ed
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #18288 +/- ##
=========================================
- Coverage 85% 60% -25%
=========================================
Files 427 419 -8
Lines 33138 33017 -121
=========================================
- Hits 28188 19888 -8300
- Misses 4950 13129 +8179 |
2a760d7
to
11905b2
Compare
ad39540
to
6fde265
Compare
89a6e5d
to
2877985
Compare
9f54d75
to
d0d6c4b
Compare
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.
Awesome feature
What does this PR do?
This PR proposes a prettier warning printing. Currently, the user sees a warning formatted like this, with all the text crammed in a single line and a strange
rank_zero_warn(
on a new line:In a normally sized terminal window, the filename can take up a big chunk of space. The user then only sees very little of the actual warning message, and has to scroll horizontally which could be considered annoying.
I experimented with custom formatting. Here are a few versions:
Version 1: Multi-line: Warning type on same line
Version 2: Multi-line: Warning type on new line
Version 3: Multi-line: With indentation
Version 4: Single line, but no awkward "rank_zero_only(" on new line
Please let me know whether you find this a good idea, you have any suggestions or if you see any problems with this formatting style.
cc @Borda @carmocca @justusschock @awaelchli