Skip to content
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

Add colors to SCons error/warning messages #88074

Closed

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Feb 7, 2024

This also includes various improvements to the messages:

  • Remove some "success" messages that were printed on every build, such as the macOS minimum supported version (which is already mentioned in the documentation. Only the "error" variants of these messages are kept.
  • Use gray color for the build timer printed at the end of each build, and only display 2 decimals.
  • Use non-zero exit codes when exiting after some error messages that previously exited with a zero (success) exit code.
  • Improve formatting of the Direct3D 12 missing dependencies message.
  • Clarify how MSVC is detected in the message printed when it's detected.
  • Force colored output on CI (it's non-interactive but can still display colors).

Preview

Screenshot_20240207_202104

Screenshot_20240207_202502

Screenshot_20240207_202726

I also had automatic underlining of backticked text at some point, but I removed it for now. Let me know if you'd like me to readd it:

Screenshot_20240207_201931

@Calinou Calinou added this to the 4.x milestone Feb 7, 2024
@Calinou Calinou requested review from a team as code owners February 7, 2024 19:32
@Calinou Calinou force-pushed the scons-add-colored-warnings-errors branch 5 times, most recently from 772d35b to 37cef60 Compare February 9, 2024 23:47
Copy link
Contributor

@Riteo Riteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty!

@Calinou Calinou force-pushed the scons-add-colored-warnings-errors branch from 37cef60 to 0fcefaf Compare February 15, 2024 17:56
This also includes various improvements to the messages:

- Remove some "success" messages that were printed on every build,
  such as the macOS minimum supported version (which is already mentioned
  in the documentation). Only the "error" variants of these messages
  are kept.
- Use gray color for the build timer printed at the end of each build,
  and only display 2 decimals.
- Use non-zero exit codes when exiting after some error messages that
  previously exited with a zero (success) exit code.
- Improve formatting of the Direct3D 12 missing dependencies message.
- Clarify how MSVC is detected in the message printed when it's detected.
- Force colored output on CI (it's non-interactive but can still display colors).
@Calinou Calinou force-pushed the scons-add-colored-warnings-errors branch from 0fcefaf to 8064491 Compare March 12, 2024 23:38
+ get_ndk_version()
+ " manually."
)
sys.exit()
sys.exit(200)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 200 here specifically? We seem to use 255 throughout otherwise.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see we had this:

platform/windows/detect.py
305:        sys.exit(200)

That's the only occurrence, so I'd tend to say it was a mistake and not an intentional error reporting API.

@akien-mga
Copy link
Member

Superseded by #91220.

@akien-mga akien-mga closed this Apr 29, 2024
@akien-mga akien-mga removed this from the 4.x milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make warnings/notes in build scripts colored
3 participants