rust-lang / rust-lang/rust

compiletest: error emitter pretty svg tests don't normalize color differences between Windows and Unixes

Open
#135,270 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-compiletest A-diagnostics A-testsuite C-bug D-diagnostic-infra O-windows T-bootstrap T-compiler
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

Image
Image

This is the svg snapshots of the same test test/ui/error-emitter/multiline-removal-suggestion.rs (the former is the reference Unix-blessed snapshot, the latter is generated on Windows with //@ only-linux removed), but I believe this fails on Windows because the exact colors chosen are different. I believe this is because there are certain cmd.exe default bright colors which are very hard to read, so we actually pick different colors on purpose.

cc @estebank for FYI: I reasoned about the failure in #134664 incorrectly, I found out today after revisiting #132752, which is a different bug.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the compiletest case test/ui/error-emitter/multiline-removal-suggestion.rs and compare its Unix-blessed SVG snapshot with the Windows-generated snapshot. Trace the snapshot comparison and color-selection behavior to determine where platform-specific color differences should be normalized. Done means the test can run on both platforms without requiring different color snapshots.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.