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: add support for provided WorkDoneToken in ExecuteCommand #40527
Comments
|
I don't think we actually ever use the WorkProgressToken passed in by any request, though we should. @findleyr has the most experience with this code, and maybe have some thoughts here? |
Yeah, this is a bug. I'll fix it. |
Change https://golang.org/cl/247321 mentions this issue: |
Change https://golang.org/cl/247407 mentions this issue: |
Our WorkDone reporting was generating a random token for each unit of work, even if a token was supplied by the client. Change this to use the client token if it is non-empty, and skip the workDoneProgress/create request. After this change we can no longer rely on tokens being a string. Update our progress tracking accordingly. For golang/go#40527 Change-Id: I702f739c466efb613b69303aaf07005addd3b5e2 Reviewed-on: https://go-review.googlesource.com/c/tools/+/247321 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
What version of Go are you using (
go version
)?What did you do?
Called
ExecuteCommand
with a providedWorkDoneToken
:When
gopls
starts to executego generate
, it sends aShowMessageRequest
to the client so the client can present a dialog to the user. That dialog includes an action,Cancel
, to let the user cancelgo generate
before it's done.Using a
WorkDoneToken
in theExecuteCommand
request is the only way I found to tie the dialog to a specific execution. If it can't be tied to that specific execution there is no way to know when the dialog should be automatically closed (i.e. whengo generate
is done andCancel
isn't a valid action anymore).What did you expect to see?
The
WorkDoneToken
used during progress reporting.What did you see instead?
A new token created for me:
That is used to report progress:
The text was updated successfully, but these errors were encountered: