Skip to content

Add a regexp for problem matching on the msvc linker output - #4675

Merged
snehara99 merged 7 commits into
microsoft:mainfrom
bradphelan:problem-matcher-linker
Feb 10, 2026
Merged

snehara99 merged 7 commits into
microsoft:mainfrom
bradphelan:problem-matcher-linker

Conversation

@bradphelan

@bradphelan Brad Phelan (bradphelan) commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor

This change addresses item #4077

It doesn't specifically fix #4077 but it adds the missing problem matcher for MSVC linker errors.

Problem

When running CMake: build with msvc all the build errors are found and added to the problems pane. However linker errors are not found.

This is of particular concern with using github copilot in an agent loop. The agent expects to be able to see the problems via get_errors and if the linker errors are lost then the llm gets very confused because it will see that the build has completed and then it will proceed to run my tests which may not have been built and then it goes quickly downhill.

I've made a separate REGEX for the linker to avoid messing with the already complex regexp used for the compiler. This means two regexp per line which I hope is not considered bad form or a performance issue.

image
@bradphelan

Copy link
Copy Markdown
Contributor Author

Hannia Valera (@hanniavalera) I added more regexps and more tests

Brad Phelan added 3 commits February 10, 2026 13:27
…le. link errors need a dummy file to point to. This is a work around. Perhaps the copilot, vscode and cmake-tools-teams need to talk to ensure llm agent workflow is robust
@bradphelan

Copy link
Copy Markdown
Contributor Author

Hannia Valera (@hanniavalera) The big hack now is that get_errors from copilot doesn't support diagnostics without a source file. I've hacked the diagnostics to produce a dummy source file for linker errors. Now copilot can consume these errors correctly

@hanniavalera

Copy link
Copy Markdown
Contributor

Hi Brad Phelan (@bradphelan), thanks for this contribution, looking over this now! :)

@snehara99
snehara99 merged commit 0802573 into microsoft:main Feb 10, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants