go/internal
Robert Findley 76325da620 internal/lsp/progress: detach context for all progress notifications
Use a detached Context for all progress notifications. In particular,
using a detached Context for the window/workDoneProgress/create
notification avoids races where the $/cancelRequest notification and
create response cross paths, such that the client has created a progress
dialog but the server thinks that starting progress failed.

Also, as a matter of best practice don't store a context on the WorkDone
type, despite the fact that this Context is detached. Instead, only
close over a Context in the WorkDoneWriter, which requires a Context in
order to function but which implements the io.Writer interface.

The TestProgressBarErrors test should now pass reliably.

Fixes golang/go#46930

Change-Id: I0d115ed3a62de97fe545c8dc0403e7bb55f6e481
Reviewed-on: https://go-review.googlesource.com/c/tools/+/409936
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-06-02 20:26:04 +00:00
..
analysisinternal go/analysis/passes/tests: Check malformed fuzz target. 2022-02-16 18:26:19 +00:00
apidiff all: gofmt 2022-04-12 17:53:17 +00:00
event all: gofmt 2022-04-12 17:53:17 +00:00
fakenet
fastwalk all: gofmt 2022-04-12 17:53:17 +00:00
gocommand internal/gocommand: skip ill-formed env vars in cmdDebugStr 2022-05-25 15:29:25 +00:00
gopathwalk internal/gopathwalk: remove unnecessary call to os.Lstat 2022-03-31 05:33:07 +00:00
imports all: gofmt 2022-04-12 17:53:17 +00:00
jsonrpc2 internal/jsonrpc2*: remove usage of golang.org/x/xerrors 2022-04-20 16:10:40 +00:00
jsonrpc2_v2 internal/jsonrpc2*: remove usage of golang.org/x/xerrors 2022-04-20 16:10:40 +00:00
lsp internal/lsp/progress: detach context for all progress notifications 2022-06-02 20:26:04 +00:00
memoize all: gofmt 2022-04-12 17:53:17 +00:00
packagesinternal x/tools/go/packages: on Go 1.19+, explicitly ask for -json fields needed 2022-04-19 17:08:06 +00:00
proxydir
span internal/lsp/mod: fix broken assumptions about file base 2022-06-01 22:04:06 +00:00
stack all: gofmt 2022-04-12 17:53:17 +00:00
testenv internal: remove pre-go1.12 conditionally compiled files 2022-05-05 16:48:28 +00:00
tool internal/tool: implement structured help command 2022-05-04 22:58:41 +00:00
typeparams internal/typeparams: adds core type implementation 2022-05-17 21:56:59 +00:00
typesinternal internal/typesinternal: update typesinternal for 1.18 2022-02-22 16:42:18 +00:00
xcontext