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

Clean up multiroot exclude glob handling #29505

Closed
roblourens opened this issue Jun 26, 2017 · 3 comments
Closed

Clean up multiroot exclude glob handling #29505

roblourens opened this issue Jun 26, 2017 · 3 comments
Assignees
Labels
debt Code quality issues search Search widget and operation issues workbench-multiroot Multi-root (multiple folders) issues
Milestone

Comments

@roblourens
Copy link
Member

roblourens commented Jun 26, 2017

From #29164

We need to have a centralized place where exclude globs are resolved in a multiroot-aware fashion. Right now this is done differently in different places because the scenarios have different needs, are running in different processes, etc and I couldn't decide how to organize it in June.

https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/search/node/ripgrepTextSearch.ts#L383

https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/search/node/fileSearch.ts#L91

https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/history/browser/history.ts#L120

@vscodebot vscodebot bot added the search Search widget and operation issues label Jun 26, 2017
@roblourens roblourens modified the milestones: June 2017, July 2017 Jun 26, 2017
@roblourens roblourens added the workbench-multiroot Multi-root (multiple folders) issues label Jun 26, 2017
@bpasero
Copy link
Member

bpasero commented Jul 2, 2017

@roblourens fyi I introduced ResourceGlobMatcher to be able to share a the filtering of history and file events in the explorer. Would be good to build on top of this guy to share it in more places.

This helper takes care of:

  • caching the parsed glob expressions
  • updating it on configuration changes and root changes
  • providing fast access to the patterns

Unfortunately I think it currently cannot easily be used together for files.exclude and search.exclude due to the siblings feature (exclude files that have xyz siblings). But maybe you can add this functionality into and then we can also use it for those filtering conditions.

@roblourens
Copy link
Member Author

I spent some time trying to share ResourceGlobMatcher with search, but decided it doesn't make sense, since search is dealing with search queries and search paths, which may or may not be root folders, and if you factor that out, then you just aren't sharing that much. Also, I don't think the pattern caching in ResourceGlobMatcher is that useful because glob.ts already caches all parsed patterns.

So I have a large change in progress that centralizes the "search query interpretation" logic for fileSearch.ts and the stuff in the renderer process, and fixes #31819 in a nice clean way, but it's a WIP. And in parallel I'm still thinking about changing the search query format anyway, so... this goes to September.

@roblourens roblourens added the debt Code quality issues label Nov 26, 2017
@roblourens roblourens modified the milestones: November 2017, Backlog Dec 2, 2017
@roblourens
Copy link
Member Author

Lots has changed here

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues search Search widget and operation issues workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

2 participants