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

Some error messages are invisible in Solorized Light #101045

Closed
helltraitor opened this issue Aug 26, 2022 · 5 comments
Closed

Some error messages are invisible in Solorized Light #101045

helltraitor opened this issue Aug 26, 2022 · 5 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@helltraitor
Copy link

In some cases, rust compiler doesn't provide full error information:
Here, all is fine: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=44b2e8f8c231c6475a366c84f25f4ecd

Compiling playground v0.0.1 (/playground)
error[E0614]: type `u64` cannot be dereferenced
 --> src/main.rs:6:5
  |
6 |     *value.field = 10;
  |     ^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0614`.
error: could not compile `playground` due to previous error

Example on FreeImage.host
This issue appears on Windows terminal, but also I think that this is platform independed.

Consider to make error message color red as in playground

Apologize section:
Probably that issue is not so useful (because it's just a color), but I want to help to rust community
As for me, it was very unexpected to get this issue. I was thinking that something wrong in compiler, but thankfully it's not

@helltraitor helltraitor added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 26, 2022
@the8472
Copy link
Member

the8472 commented Aug 26, 2022

Assuming the compiler uses standard 8x2 ansi colors (8 colors x 2 brightness levels) and not RGB values then this is an issue with the terminal configuration. You have to set up your color scheme so that those 16 colors are distinct.

@helltraitor
Copy link
Author

Assuming the compiler uses standard 8x2 ansi colors (8 colors x 2 brightness levels) and not RGB values then this is an issue with the terminal configuration. You have to set up your color scheme so that those 16 colors are distinct.

I'm not quite understand what I can or must do. Windows terminal supports RGB (or I don't get your message):
https://www.reddit.com/r/Batch/comments/k5iprq/the_windows_console_apparently_now_supports_rgb/

@the8472
Copy link
Member

the8472 commented Aug 26, 2022

There are multiple ways to tell a terminal to show a color. One is to set explicit RGB values (which can be problematic if one uses an RGB value as foreground which matches the user-defined background) or as a 16-color palette that is user-configurable.

As far as I can tell rustc only uses the latter. Which means it will use the colors configured in the windows terminal color scheme: https://chrisyeh96.github.io/2020/03/28/terminal-colors.html#windows-colors
The foreground colors should be set up so that all colors except the first are visible on the chosen default background color.

@ChrisDenton
Copy link
Member

This is a known issue with the solarized colour scheme: microsoft/terminal#6997. It is recommended to either use another theme or to override the invisible colours manually.

@helltraitor
Copy link
Author

Thanks, I will choose another theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants