Skip to content

Fix color code detection in OutputManager#2430

Open
ian-h-chamberlain wants to merge 1 commit intoactions:mainfrom
ian-h-chamberlain:fix/proper-escape-color-code
Open

Fix color code detection in OutputManager#2430
ian-h-chamberlain wants to merge 1 commit intoactions:mainfrom
ian-h-chamberlain:fix/proper-escape-color-code

Conversation

@ian-h-chamberlain
Copy link

@ian-h-chamberlain ian-h-chamberlain commented Feb 12, 2023

Fixes #2341

This was a simple case of a mistaken translation from shell escape codes (which support octal \NNN) to C# (which only supports hex \xNN and \uNNNN in string literals, but does support octal \NNN in Regex). The test was passing because it also used incorrect escape codes, which matched the incorrect prefix.

Edit: manual testing against the original repro repo: https://github.com/ian-h-chamberlain/actions-color-repro/actions/runs/4157866967

@ian-h-chamberlain ian-h-chamberlain requested a review from a team as a code owner February 12, 2023 19:47
jonasbb added a commit to actions-rust-lang/setup-rust-toolchain that referenced this pull request Mar 17, 2023
The action runner currently fails to strip color codes from the output.
This means that many matchers currectly do not work.

actions/runner#2341
actions/runner#2430

The new matcher is copied from kaj/rsass which is MIT licensed.

https://github.com/kaj/rsass/blob/3e5d6c0600324fe27b0a0257d3befd4bb345fedb/.github/workflows/rust-problem-matcher.json
@ian-h-chamberlain ian-h-chamberlain force-pushed the fix/proper-escape-color-code branch from 071a612 to 3a319d3 Compare September 20, 2023 18:09
@github-actions github-actions bot added the Stale label Sep 30, 2024
@ian-h-chamberlain ian-h-chamberlain force-pushed the fix/proper-escape-color-code branch from 3a319d3 to c21dc60 Compare October 4, 2024 18:36
@ian-h-chamberlain
Copy link
Author

This was marked as stale, but as far as I know is still needed and the fix is still valid. Not sure if there's any way to unstale or get a review / CI besides just commenting here...

@github-actions github-actions bot removed the Stale label Oct 7, 2024
This was a simple case of a mistaken translation from shell escape cades
(which support "\nnn") to C# (which only supports "\xNN" and "\uNNNN").
The test was passing because it also used invalid escape codes.
@ian-h-chamberlain ian-h-chamberlain force-pushed the fix/proper-escape-color-code branch from c21dc60 to 7c2ba58 Compare June 20, 2025 23:43
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.

Problem matchers do not work on colored output

1 participant