Uh oh!
There was an error while loading. Please reload this page.
build: shorten configuration print on stdout - #483
Conversation
bnoordhuis
commented
Jan 17, 2015
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.) |
silverwind
commented
Jan 17, 2015
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. |
bnoordhuis
commented
Jan 17, 2015
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
62a9063Comparesilverwind
commented
Jan 18, 2015
@bnoordhuis updated PR to use textwrap to wrap at 78. Output look like this now: |
bnoordhuis
commented
Jan 18, 2015
@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
ab5dc65Comparesilverwind
commented
Jan 18, 2015
Updated. Is this alright? I changed user.name before commiting and force-pushing again. |
saghul
commented
Jan 18, 2015
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>
bnoordhuis
commented
Jan 18, 2015
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: