-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 references cancellation and preview #11056
Conversation
Extension/src/LanguageServer/Providers/callHierarchyProvider.ts
Outdated
Show resolved
Hide resolved
6536d7b
to
c99d0e9
Compare
Extension/src/LanguageServer/Providers/callHierarchyProvider.ts
Outdated
Show resolved
Hide resolved
Extension/src/LanguageServer/Providers/callHierarchyProvider.ts
Outdated
Show resolved
Hide resolved
Extension/src/LanguageServer/Providers/callHierarchyProvider.ts
Outdated
Show resolved
Hide resolved
Extension/src/LanguageServer/Providers/callHierarchyProvider.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see Find All References cancels Call Hierarchy, but Call Hierarchy isn't canceling Find All References -- can you add cancel handling to prepareCallHierarchy be make that cancel Find All References (and Call Hierarchy)?
Added. |
Extension/src/LanguageServer/Providers/findAllReferencesProvider.ts
Outdated
Show resolved
Hide resolved
1a9698d
to
42bbea7
Compare
This changeset simplifies how preview works for "find all references". It also makes cancellation more straightforward and sequential for "find all references", "rename" and "call hierarchy callers of" by changing their messages to the language server to a
RequestType
object. This avoids race conditions in reading cancellation states among the different requests and also avoids the chance of not resolving a request from reading/setting incorrect states due to race conditions.This change also has a corresponding changeset on the language server code base.
Changes for Preview and Cancel for Find All References
Request Changes
RequestType
object. This is to ensure synchronization of a language server response to its typescript sender. This also removes the requirement of having to manually manage cancellation of requests.ReferencesManager.cancelCurrentReferenceRequest
.Other Changes