-
Notifications
You must be signed in to change notification settings - Fork 464
-no-color option doesn't do anything #2984
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
Comments
I think |
It looks like a bsb option. I want no color when I compile in emacs (because emacs can parse the output and do smart things with it) or redirect the output to a file. |
note the output could come from bsb.exe, bsc.exe and ninja.exe. |
Yes, it would be nice to remove the colors from the whole chain. If bsc follows the same convention than the ocaml compiler, then it is already good. I don't know about ninja. |
After some thoughts, from the point of the view of the build system, I think it is a mistake to expose such flag, there are multiple reasons for this
To make color configurable, we are going to piggy back the existing environment variable, NINJA_ANSI_FORCED. When NINJA_ANSI_FORCED is set 1, bsb.exe will produce colors, ninja.exe will produce colors and preserve the ANSI code by bsc.exe, note bsc.exe will be passed flag "-color always" When NINJA_ANSI_FORCED is set 0, bsb.exe will not produce colors, ninja.exe will not produce colors and it will try to strip ANSI code by bsc.exe, note bsc.exe will still be passed a flag "-color always" When NINJA_ANSI_FORCED is unset, bsb.exe will produce colors based on terminal test, this is the same with ninja.exe, note bsc.exe will still be passed a flag "-color always" The take away is that bsc.exe will be always passed a flag "-color always", it will be determined in the runtime to strip ansi code or not, so that the build system(generated build.ninja) will not be affected. |
Launching bsb using
yarn run bsb -make-world -no-color
produces the same output with colors thanyarn run bsb -make-world
.The text was updated successfully, but these errors were encountered: