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
Assignees
Milestone

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Nov 18, 2019

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

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 18, 2019

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

This comment has been minimized.

Copy link

@ianthehat ianthehat commented Nov 19, 2019

$/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

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 19, 2019

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

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Nov 19, 2019

That's what I thought - thanks for confirming.

@stamblerre stamblerre closed this Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.