-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
SCons: Colorize warnings/errors during generation #91220
SCons: Colorize warnings/errors during generation #91220
Conversation
a60846a
to
0d38176
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.
Holy moly you rock!
Took a look and the diff looks fine!
Does this supersede #88074? It includes some not changes not made in this PR. |
I don't think it supercedes that PR entirety; though, it probably would need a different title if left as-is |
Oops, I forgot about the older PR, I'm sorry @Calinou. This is a bit of an unfortunate situation. How should we handle it? They're both great PRs, with the same main change but different details. |
0d38176
to
ebfc551
Compare
Did some cleanup work; now it supersedes #88074! The only bits I didn't bring over were |
Sounds good to me. We should make sure to update the Compiling on Windows documentation to require Python 3.7 though, if we start requiring it de facto for proper display of errors/warnings on Windows. |
Ehhh, if we gotta go through that trouble I'll just add that bit of code after all; I'll throw in a note that it should be removed when the minimum version is >=3.7 |
ebfc551
to
ca1308b
Compare
Hmm, I might've misread the original post; I don't think it's necessarily limited to 3.7 after all. And yet, I've never had any issues with displaying colored text & I use Windows 11, so I honestly have no clue what circumstances cause that bug to occur. Either way, no real harm done in including it. |
Python 3.7 reached end-of-life 10 months ago. 3.8 and later still get security fixes. |
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.
Tested locally (Windows 11 23H2, MSVC 2022, Python 3.12.3), it works as expected. Code looks good to me.
Compilation output on CI looks strange with lots of Perhaps we should use |
ca1308b
to
1c03eea
Compare
1c03eea
to
e0e8ce1
Compare
I double-checked the PR this supersedes, and that error was happening there too. Seems like enabling progress reporting for CI is what caused it, as reverting that fixed the issue. |
Thanks! |
This MR broke use_mingw flag on windows:
Note: Compilation proceeds when |
This change adds the ability to substitute
print
withmethods.print_warning
ormethods.print_error
, prepending the messages withWARNING:
/ERROR:
and colorizing them as yellow/red respectively. The messages will also be routed tostderr
instead ofstdout
, allowing users to silencestdout
without missing on any crucial information if a build fails or otherwise stops. non-atty environments won't benefit from colorization, but will still enjoy prefix &stderr
benefits.EDIT: Supersedes #88074
Bugsquad edit: