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

Why are ISearchProvider methods declared async? #8264

Closed
AlbertHilb opened this issue Apr 23, 2020 · 2 comments
Closed

Why are ISearchProvider methods declared async? #8264

AlbertHilb opened this issue Apr 23, 2020 · 2 comments

Comments

@AlbertHilb
Copy link
Contributor

@jasongrout, @aschlaep

Hi all.

I'm working on the search and replace extension. I want to add an option to limit the scope of the search to the active cell (#2017) and to fix various other issues (#7881, #7898, #8152).

Looking at the code I encountered a design decision I don't understand.
I wish my doubts to be clarified before going on.

Why are the ISearchProvider interface methods declared async?
I can't find any place inside implementation of such methods, where asynchronous operations are executed.

Am I missing something?

@aschlaep
Copy link
Member

Good question! As I remember it, we decided to make the interface async in cases any future implementations of ISearchProvider needed to do something asynchronously. Some examples we tossed around were searching a map or searching the filesystem (for whole-workspace search). We thought it'd be best to just have the interface be async from the start, as it'd be really difficult to change it async once people started using it.

@jasongrout
Copy link
Contributor

Closing as answered. If you'd like to continue the discussion, please feel free to continuing commenting.

@jasongrout jasongrout added this to the Reference milestone Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants