Skip to content

Conversation

@meganrogge
Copy link
Contributor

@meganrogge meganrogge commented Dec 16, 2025

fixes #274750
fixes #167454

And adds lots of tests

Copilot AI review requested due to automatic review settings December 16, 2025 19:23
@meganrogge meganrogge self-assigned this Dec 16, 2025
@meganrogge meganrogge added this to the December / January 2026 milestone Dec 16, 2025
@meganrogge meganrogge enabled auto-merge (squash) December 16, 2025 19:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the msCompile problem matcher regex to handle additional diagnostic format variations from MSBuild and C# compilers, fixing issues #274750 and #167454. The changes make the pattern more flexible by supporting optional location information, optional diagnostic codes, subcategories, and leading whitespace.

Key changes:

  • Enhanced the msCompile regex pattern to handle optional components (location, code, subcategory)
  • Added fallback logic to change problem location kind from Location to File when location info is absent
  • Added comprehensive test coverage for the new regex capabilities
  • Included an unrelated fix for proper disposal of TaskQuickPick instances

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/contrib/tasks/common/problemMatcher.ts Updated msCompile regex to make location and code optional, support subcategories, and handle leading whitespace; added logic to fallback to File kind when location is missing
src/vs/workbench/contrib/tasks/test/common/problemMatcher.test.ts Added comprehensive test suite for msCompile matcher covering all new regex capabilities including leading whitespace, optional codes, optional locations, subcategories, and complex scenarios
src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts Added try-finally block to ensure TaskQuickPick is properly disposed after use (unrelated to PR description)

Comment on lines +3018 to +3023
const taskQuickPick = this._instantiationService.createInstance(TaskQuickPick);
try {
return await taskQuickPick.show(placeHolder, defaultEntry, type, name);
} finally {
taskQuickPick.dispose();
}
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

This change adds proper disposal of the TaskQuickPick instance, which is good for resource management. However, this change is not mentioned in the PR description and appears unrelated to the msCompile matcher update described in the title and linked issues. Consider creating a separate PR for this fix or updating the PR description to mention this additional improvement.

Copilot uses AI. Check for mistakes.
@meganrogge meganrogge merged commit f9c4d40 into main Dec 16, 2025
33 of 34 checks passed
@meganrogge meganrogge deleted the worrying-narwhal branch December 16, 2025 19:41
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.

Leaked disposable in task quick pick $msCompile regular expression does not match valid MSBuild error and warning output

3 participants