Repository navigation
Conversation
strip-ansi-escapes routes output through VTE, which drops Latin-1 and other non-UTF-8 octets in diagnostics when stdout is not a terminal. Replace it with a byte-wise CSI/OSC stripper so ColorMode::Off still keeps the compiler's raw bytes. Fixes mozilla#2864.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2879 +/- ##
==========================================
+ Coverage 73.34% 76.71% +3.36%
==========================================
Files 72 72
Lines 40776 40884 +108
==========================================
+ Hits 29909 31363 +1454
+ Misses 10867 9521 -1346 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When stdout/stderr is not a terminal (or
ColorMode::Off), sccache strips ANSI from cached compiler output before writing it back. That path usedstrip_ansi_escapes::Writer, which parses through VTE and drops any byte that is not valid UTF-8 ground-state input — including Latin-1 octets in#warningtext, C1 controls, and bare\r.So a plain
gccdiagnostic likecaf\xe9survives, but the same bytes through sccache becomecafwith the0xe9gone. Repro from the issue (non-TTY stderr):This replaces the VTE-based stripper with a small byte-wise CSI/OSC walker that only removes escape sequences and copies every other octet unchanged.
ColorMode::On/ TTY paths still write the original bytes.Fixes #2864.