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

Feature Request: partial path matching for Problem Matcher #24624

Closed
TimCondon opened this issue Apr 12, 2017 · 4 comments
Closed

Feature Request: partial path matching for Problem Matcher #24624

TimCondon opened this issue Apr 12, 2017 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues

Comments

@TimCondon
Copy link

TimCondon commented Apr 12, 2017

  • VSCode Version: Code 1.10.2 (8076a19, 2017-03-08T14:00:46.854Z)
  • OS Version: Linux x64 3.10.0-327.4.4.el7.x86_64

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?

@dbaeumer
Copy link
Member

@TimCondon this is a dup of #11663.

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 dbaeumer added *duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues labels Apr 13, 2017
@TimCondon
Copy link
Author

TimCondon commented Apr 13, 2017

@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...

@dbaeumer
Copy link
Member

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.

@xaljox
Copy link

xaljox commented May 31, 2017

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.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues
Projects
None yet
Development

No branches or pull requests

3 participants