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

x/tools/gopls: support $/cancelRequest correctly #35679

Closed
stamblerre opened this issue Nov 18, 2019 · 4 comments
Closed

x/tools/gopls: support $/cancelRequest correctly #35679

stamblerre opened this issue Nov 18, 2019 · 4 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@stamblerre
Copy link
Contributor

CL 207598 added a (*server).CancelRequest function that we had not previously had. We should support cancellation of a specific request.

@stamblerre stamblerre added NeedsFix The path to resolution is known, but the work has not been done. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Nov 18, 2019
@gopherbot gopherbot added this to the Unreleased milestone Nov 18, 2019
@gopherbot
Copy link

Change https://golang.org/cl/207718 mentions this issue: internal/lsp: fix infinite recursion in CancelRequest

gopherbot pushed a commit to golang/tools that referenced this issue Nov 18, 2019
Quick fix to (*server).CancelRequest, but we haven't implemented actual
support for it. Filed golang/go#35679 to track this.

Change-Id: Ic0de01d49b779c4f0656587584fbd2bf8791d0ce
Reviewed-on: https://go-review.googlesource.com/c/tools/+/207718
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@ianthehat
Copy link

$/cancelRequest is specially handled at the transport layer in order to be able to cancel requests out of the queue (and is fully implemented), the typescript generator used to know not to generate this function.

@gopherbot
Copy link

Change https://golang.org/cl/207898 mentions this issue: internal/lsp: fix the return type of CodeAction()

gopherbot pushed a commit to golang/tools that referenced this issue Nov 19, 2019
Paul Jolly observes that returning interface{} is not helpful.
Now CodeAction() returns []CodeAction.

The type in typescript is (Command | CodeAction)[] | null
but the choice is up to gopls, which returns []CodeAction.

Fixes golang/go#35688, golang/go#35679

Change-Id: I91c22bb0752431954ae2f993cb7b44726cf60e5c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/207898
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@stamblerre
Copy link
Contributor Author

That's what I thought - thanks for confirming.

@golang golang locked and limited conversation to collaborators Nov 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants