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

lsp: More graceful shutdown #676

Merged
merged 1 commit into from
Apr 23, 2024
Merged

lsp: More graceful shutdown #676

merged 1 commit into from
Apr 23, 2024

Conversation

charlieegan3
Copy link
Member

We have been erroring on shutdown requests as they have no params set. This PR changes that and makes sure the server waits for the exit message before closing the connection.

The client shows:

[Error - 18:21:10] Server process exited with code 0.

This is an odd one based on the code here:

https://sourcegraph.com/npm/vscode-languageclient@492942af8005ce98cbd47721d4a7790a0310d4e3/-/blob/lib/node/main.js?L474:37-474:68

It would look like we exit ok here, but that seems to be perhaps parsed as "0" the string... One for another day.

Before:

Screen.Recording.2024-04-23.at.18.24.26.mov

After

Screen.Recording.2024-04-23.at.18.17.44.mov

We have been erroring on shutdown requests as they have no params set.
This PR changes that and makes sure the server waits for the exit
message before closing the connection.

The client shows:

```
[Error - 18:21:10] Server process exited with code 0.
```

This is an odd one based on the code here:

https://sourcegraph.com/npm/vscode-languageclient@492942af8005ce98cbd47721d4a7790a0310d4e3/-/blob/lib/node/main.js?L474:37-474:68

It would look like we exit ok here, but that seems to be perhaps parsed
as "0" the string... One for another day.

Signed-off-by: Charlie Egan <charlie@styra.com>
@anderseknert anderseknert merged commit 03c38aa into main Apr 23, 2024
3 checks passed
@anderseknert anderseknert deleted the more-graceful-shutdown branch April 23, 2024 19:13
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
We have been erroring on shutdown requests as they have no params set.
This PR changes that and makes sure the server waits for the exit
message before closing the connection.

The client shows:

```
[Error - 18:21:10] Server process exited with code 0.
```

This is an odd one based on the code here:

https://sourcegraph.com/npm/vscode-languageclient@492942af8005ce98cbd47721d4a7790a0310d4e3/-/blob/lib/node/main.js?L474:37-474:68

It would look like we exit ok here, but that seems to be perhaps parsed
as "0" the string... One for another day.

Signed-off-by: Charlie Egan <charlie@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants