-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Strip color from ninja status #1584
base: master
Are you sure you want to change the base?
Strip color from ninja status #1584
Conversation
#198 missed this output codepath for stripping ANSI codes. |
What to do about the test failure? Set |
Update the test here: https://github.com/ninja-build/ninja/blob/master/misc/output_test.py#L90 Why would you want to strip the codes from the build status in the first place though? |
I know which test to update, the question is what is the better solution :) . CMake runs its compiler information detection (built-in include directories, link directories, etc.) as a build step and pipes the output to a file. When that file has ANSI escapes in it, CMake's logic ends up bailing. ANSI color should only go to a terminal unless |
Sure, why should there be ANSI escape codes in the status lines though?
Sounds like a bug to me ;) |
My |
Yes, but that doesn't make this not a bug on Ninja's side too… CMake still has to expect color if |
CMake pipes the whole Ninja command? Sounds to me, that it should override
Strictly speaking, that's not a supported configuration yet. |
Well I had a PR long ago which worked and then the ANSI stuff landed and I haven't had a chance to fix elision again :/ . That's probably also a solution, but this still seems like a bug to me anyways. |
I'm still thinking about all those frontend changes. To reduce the maintenance burden I would prefer fancy stuff happening in external frontends, e.g. https://github.com/jhasse/ja. |
Would the existing color support then move out too? If not, I think this still makes sense. |
The existing color support is for build output, not for the build status. |
I was just bitten by this today while trying to customize my See also the related CMake issue: https://gitlab.kitware.com/cmake/cmake/-/issues/19316 |
As far as I can tell this PR strips ansi color only if the output doesn't support color/ANSI escape sequences, which make sense. Removing ANSI color completely from
|
Ah, right see #1494 for a separate approach (which worked before but fails…haven't gotten back to it). |
No description provided.