Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC Warning/Error Regex does not catch all warnings/errors that Visual Studio 2022 normally would. #4262

Open
tfinnegan937 opened this issue Jan 29, 2025 · 0 comments
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature

Comments

@tfinnegan937
Copy link

Brief Issue Summary

There is a regular expression used by CMake Tools to detect MSVC errors in the following format:

C:\path\to\source.cpp(999): error C9999: some error message here.

This matches the output produced by the MSVC compiler.

Visual Studio, however, is more inclusive in the types of errors that it chooses to display. Usually it's particularly lenient on spacing.

For example, my team has historically run custom CMake commands to produce errors in the following format:

C:\path\to\source.cpp (999) : error C9999 : some error message here.

When moving to VSCode and CMake tools, we have had to go through and adjust the format of all of our error messages to what VSCode expects.

While the above format is not conformant to what the MSVC compiler produces, it is a format that various windows prebuild scripts have been programmed to produce.

CMake Tools should update their regular expressions to be more lenient on the spacing of MSVC-style errors so that it is compatible with all error outputs that visual studio normally would be. Currently, the error with additional spaces is not detected by CMake Tools when building our CMake project.

We have quite a complex buildsystem for our project, and while we can update the errors (and likely will, as cmake tools implementing this is not guaranteed), it would be nice if CMake Tools accepted the same error formats that Visual Studio 2022 does.

CMake Tools Diagnostics

Debug Log

Additional Information

No response

@github-project-automation github-project-automation bot moved this to Blocked in CMake Tools Jan 29, 2025
@Amy-Li03 Amy-Li03 added enhancement an enhancement to the product that is either not present or an improvement to an existing feature and removed triage labels Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature
Projects
Status: Blocked
Development

No branches or pull requests

2 participants