Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Stop doing action for handles and ignore responses after shutdown #567
Stop doing action for handles and ignore responses after shutdown #567
Changes from 5 commits
e63e1e0
a1b7bb0
b6d5b04
cd35f7e
2066243
fcc1d06
95e4b0b
7c5febc
c18a370
41d9e21
23cd222
fda5f24
3913962
03240c6
49ec6f4
e9efbc9
a438b4b
d933651
fc18852
ac343e9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 think this would be stronger than it needs to be. In particular, it's not a problem if we e.g. update the VFS. It's really only the config callback that's potentially problematic.
It's also not enough, since updating the configuration is complicated. This handles the
didChangeConfiguration
notification, but not the response toworkspace/configuration
. So if we wanted to do this, I think we should just stick the check intryUpdateConfig
or something.And I still think that servers should just make their config callbacks safe :)
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.
You are right , it is not enough to stop the callback.
But IMO I do not see any reason to do the
action before noti/req
even it is safe to do so, since the server is marked as shutdown anyway(Waitting the cleanup and exit notification, and ignoring other notification and request, it seems reasonable to ignore thoeseactions
bring up by recieving the notification and request after the shutdown).🤔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.
After reading the relevant issues, Is my understanding correct about config update?
There is push model and pull model(new one) in LSP,
The pull model:
didChangeConfiguration
sent to serverworkspace/configuration
sent to clientWhat we are doing here is kind of mixed:
didChangeConfiguration
sent to server, wetryChangeConfig
.workspace/configuration
sent to clienttryChangeConfig
again.