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

fix: better handling of multiple/relative outFiles #1486

Merged
merged 2 commits into from
Dec 16, 2022

Conversation

connor4312
Copy link
Member

Fixes #1479
Relates to microsoft/vscode#168635

Previously, we naively joined all incoming globs together and ran a
single search for them. However, there are two problems:

This PR redoes the logic. If there are N positive globs, we'll do N
searches in parallel, and apply relevant negations to each one.

Fixes #1479
Relates to microsoft/vscode#168635

Previously, we naively joined all incoming globs together and ran a
single search for them. However, there are two problems:

- vscode's findTextInFiles doesn't really support multiple globs
- **-prefixed negations, like `!**/node_modules/**`, should apply
  everywhere, but globbing behavior is to only apply that to the base
  path, which led to confusion (#1479)

This PR redoes the logic. If there are N positive globs, we'll do N
searches in parallel, and apply relevant negations to each one.
@connor4312
Copy link
Member Author

connor4312 commented Dec 15, 2022

To clarify the 2nd point a little more: while it is correct to only apply the negation to the cwd of the glob evaluation, the directory that js-debug internally uses is pretty opaque to the user, so I think it's a good thing to pretend it's the "filesystem root" effectively and apply it everywhere. If a user wants a more scoped negation, they can just apply that to a specific directory, like !${workspaceFolder}/node_modules/** instead of !**/node_modules/**

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.

Apply glob negations if glob is navigated outside workspace folder
3 participants