-
Notifications
You must be signed in to change notification settings - Fork 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
Made compilation error colors come through et. #57174
base: main
Are you sure you want to change the base?
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
Ahhhh, nertz! This breaks the gcc path fix since it breaks the regular expression. I'm putting this back into Draft and removing reviewers. |
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. |
environment: rbeConfig.environment, | ||
environment: { | ||
...rbeConfig.environment, | ||
'CLICOLOR_FORCE': '1', |
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.
I wonder if this is correct, that is, if this should be conditionally set if the current environment is an ANSI terminal with color support.
If it was conditionally set, would we need the parsing and massaging you did above?
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.
The behavior most people follow is if you aren't connected to a tty you don't emit ansi escape sequences. That's the behavior ninja was doing. I can emulate it. It's only a problem if someone wants to run et as a subprocess.
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.
Done, now we only show the colors if stdout supports it or if it has been overwritten with CLICOLOR_FORCE
.
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.
If it was conditionally set, would we need the parsing and massaging you did above?
Yes, we still need it because the gcc path fix is a whole different thing that assumed no ansi escape sequences.
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.
It's good practice with colors to have some way to disable them on the command line. Is there a ninja
command line option (that could be plumbed into extraNinjaArgs
in another PR) that will override the environment variable?
I'll duplicate ninja's behavior and use the environment variable. One sec, it's also related to matans comment. |
Done, see #57174 (comment) |
fixes flutter/flutter#147931
environment variable documented in github issue: ninja-build/ninja#2196
screenshot of results
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.