You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a lot of work (and sometimes impossible) to set up a problem matcher when error messages don't include absolute paths and/or include a combination of paths relative to different directories.
A simpler approach would be for VS Code to recursively build a list of all files inside the opened folder, then match filenames (ie errorFile.cpp) and partial paths (ie .../directory1/directory2/errorFile.ccp) against this list. Even if the problem matcher did nothing when there was ambiguity, this would handle virtually all of my errors with a one-line regex instead of an elaborate multi-stage system that tries to extracts relative directories from different stages of our complex build pipeline.
Any chance we can get such a feature in a future release?
The text was updated successfully, but these errors were encountered:
Regarding your approach: I think this is not feasible since it will not scale for large workspaces or for workspaces which are located on a network drive. Even VS Code only reads the directory structure very selectively.
@dbaeumer: VSCode surely already performs a partial path matching operation every time you execute workbench.action.quickOpen (ctrl+p)? Also, the operation need not be performed for every result returned by the problem matcher; it only needs to run lazily when I click on a problem matcher entry and VS Code tries to jump to the indicated line.
Without an automated solution via the problem matcher, my current workflow is to manually scan the error output, press ctrl+p, type the filename or partial path, then press ctrl+g and type the line number. It would be really nice to automate those steps...
Agree on the automation and there are ideas how to do this in #11663. We can also look into leveraging Ctrl+p infrastructure. We also adding task API so that extension can run tasks are parse the output. So if the matching gets too complicated extensions can add their own smartness.
See comment on referred #11663, made a program to process the output and convert the paths to absolute paths, so the problem matcher will work. At the moment it is targeted to C/C++ related make builds. It is work in progress, there are some internal options that are now hard compiled and will be nice to make them available as commandline switches. It can do some additional filtering to get some noise out of the output, would be nice to have that part configurable instead of hardcoded. Must add some commandline argument handling and then it is easy to add this functionality.
It's a lot of work (and sometimes impossible) to set up a problem matcher when error messages don't include absolute paths and/or include a combination of paths relative to different directories.
A simpler approach would be for VS Code to recursively build a list of all files inside the opened folder, then match filenames (ie errorFile.cpp) and partial paths (ie .../directory1/directory2/errorFile.ccp) against this list. Even if the problem matcher did nothing when there was ambiguity, this would handle virtually all of my errors with a one-line regex instead of an elaborate multi-stage system that tries to extracts relative directories from different stages of our complex build pipeline.
Any chance we can get such a feature in a future release?
The text was updated successfully, but these errors were encountered: