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

Don't emit ANSI colors in shader validation error messages. #3591

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

jimblandy
Copy link
Member

@jimblandy jimblandy commented Mar 15, 2023

fixes gfx-rs/naga#2278. The Display implementation for ShaderError<naga::WithSpan<naga::valid::ValidationError>> should not include ANSI color escape sequences in the error message, since not all consumers are ANSI terminals. For example, Firefox wants to display these messages in the web console.

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@jimblandy jimblandy force-pushed the shader-validation-no-color branch from d0b4546 to d0aa265 Compare March 15, 2023 01:52
@jimblandy jimblandy requested a review from teoxoy March 15, 2023 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ANSI escape codes in error messages in Firefox
2 participants