-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
build: shorten configuration print on stdout #483
Conversation
Looks reasonable, although I suppose some terminals might cut off long lines. Maybe you can refine it to something like this? print('\n'.join(re.findall('.{78}|.+', str(output))) (I have no idea if that's an idiomatic way of partitioning a string, perhaps @chrisdickinson or @saghul can chime in.) |
Personally, I haven't seen a terminal yet that doesn't wrap lines. An alternative would be to print that dictionary before anything else, if that's possible. |
It sometimes happens to me when I ssh into old centos boxes, not sure why.
Not easily, I think. A lot of code would have to be moved around to make that work. |
e62378e
to
62a9063
Compare
@bnoordhuis updated PR to use textwrap to wrap at 78. Output look like this now:
|
@silverwind LGTM. Can you sign the commit with your real name and maybe add one or two lines to the commit log explaining the motivation for the change? Thanks! |
Reduces the previously pretty-printed configuration dictionary to a single line wrapped at 78 characters. This makes warning messages which appear before this print more visible to the user.
62a9063
to
ab5dc65
Compare
Updated. Is this alright? I changed user.name before commiting and force-pushing again. |
Since @bnoordhuis red's me, another LGTM. Using textwrap is the idiomatic way IMHO. 👍 |
Reduces the previously pretty-printed configuration dictionary to a single line wrapped at 78 characters. This makes warning messages which appear before this print more visible to the user. PR-URL: #483 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Thanks Roman, landed in 1b1cd1c! |
The configure script prints out a prettyprinted dictionary of mostly v8 options, which right now results in a total of 34 lines being output to stdout on a regular build. Warnings like this or this are printed before the dictionary, and are likely being scrolled out of sight almost instantly on terminals with < 30 lines height.
This commit removes the pretty print resulting in single-line output, making warnings more visible, while on the other hand making the options harder to read by a human, so I'm open to suggestions!
Before:
After: