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
x/tools/cmd/gopls: no reply to shutdown request #31333
Comments
This is clearly something we need to fix, but I am also interested to know why/when emacs shuts down the language server. |
This happens when Emacs exits normally. I noticed that it got stuck for 20s (approx) after There are more problems with the |
Change https://golang.org/cl/172639 mentions this issue: |
I think that this fix has been lost, probably in golang/tools@08ecc9ed. |
/cc @pjweinb |
Change https://golang.org/cl/176921 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Emacs (
lsp-mode
) hangs when closing ago
file. The problem seems to be caused by the fact that in the current implementation:https://github.com/golang/tools/blob/0fdf0c73855bae8482c5d3907a9e06f33ff70a10/internal/lsp/protocol/server.go#L79-L86
gopls
does not reply to theshutdown
request.What did you expect to see?
According to the specification
gopls
should reply to theshutdown
request.Adding the following to the code fragment linked above solved this problem.
This is just a quick workaround. The error should also be sent to the client and more importantly the server should reject other requests in between
shutdown
andexit
with anInvalidRequest
.The text was updated successfully, but these errors were encountered: