Skip to content

Improve heuristics to parse out sccache errors and ignore unhelpful errors - #6845

Open
Karakatiza666 wants to merge 1 commit into
mainfrom
issue6763
Open

Improve heuristics to parse out sccache errors and ignore unhelpful errors#6845
Karakatiza666 wants to merge 1 commit into
mainfrom
issue6763

Conversation

@Karakatiza666

Copy link
Copy Markdown
Contributor

Testing: sccache error message parsing tested with unit tests, general behavior of parsing out error messages from stderr checked manually (no messages skipped, except unhelpful ones like "build failed due to X previous errors").

Part of #6763

…re unhelpful errors

Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
@Karakatiza666 Karakatiza666 added Web Console Related to the browser based UI javascript Pull requests that update Javascript code labels Aug 12, 2026
// which would otherwise let $ match at every line break.
const rustCompilerErrorRegex =
/^((warning:(?! `)|error(\[[\w]+\])?:)([\s\S])+?)\n(\n|(?=error|warning))/gm
/^((?:[\w-]+: )?(warning:(?! `)|error(\[[\w]+\])?:)([\s\S])+?)(\n(\n|(?=error|warning))|\n?$(?![\s\S]))/gm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a constant with comments about each part and perhaps an example matched

expect(errors[0].message.split('\n')).toHaveLength(3)
})

it('ignores black-listed warnings', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know where the blacklisted part lives, but it better be conservative. Here you want no false negatives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code Web Console Related to the browser based UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants