-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Remove/evolve FileIndexProvider #59922
Comments
Instead of copying the fuzzy matching support code into a new repo, we can publish it to an npm module out of the main vscode repo, similar to what we do with monaco. |
I'd like to understand the plan for the proposed
Since this is still only a proposed API I'm unclear why that aspect couldn't be changed. Or maybe it's that the caller would still have to URI-ify the results, and perhaps it's no cheaper there than if it was done in the EH? |
We will not ship that API because of the inherent problems it has. It's easy to blame on uris (which means blaming the use of objects) but the concept of collecting all filenames (or uris) and sending them in a single batch is problematic. With uris (objects) that might happen sooner but no matter how low-level the abstract is chosen, given the right amount of data this will be a kamikaze API. |
Thanks for the response. A get-all-in-one-batch will still happen when |
Yeah, that will happen but on the when the query is |
That all makes sense. Thank you for explaining. |
I wanted to use FileSearchProvider for a remote fs extension I'm working on (for SAP systems, which are not actual remote filesystems but close enough to work). I did get a "file search" working, but it's rather poorly integrated as I don't want to use unreleased APIs |
@marcellourbani No, this API proposal will go away. For your scenario you wanna implement a |
@jrieken Just to clarify my understanding - |
yes |
Thank you. Will have to wait the upcoming API or stay where it is in a context menu entry |
As part of this we also have to reintroduce the cacheKey/clearCache() to the FileSearchProvider. I was thinking that we had resolved this already, but no, I remember we got rid of it when moving to the FileIndexProvider...
Originally when we discussed this, we considered making the lifecycle of the request more explicit with the concept of a search "session" which is initialized, searches, and is disposed to clear the cache. I think that's overkill for this API. Let's keep this simpler option. I think that most search providers besides ones that we are involved with (liveshare) will ignore the lifecycle and cache anyway. |
The export interface FileSearchOptions extends SearchOptions {
// a token that is being reused per session. will fire cancellation
// when the session isn't needed anymore
session: CancellationToken;
} Then, as an extension I can use that token to manage my caches. |
That's a good idea |
Master issue to track stabilizing the FileSearchProvider extension API...
Forked from #47058
The text was updated successfully, but these errors were encountered: