1
0
mirror of https://github.com/golang/go synced 2024-11-18 22:55:23 -07:00
go/internal/lsp
Muir Manders 59228eac51 internal/lsp: avoid invalid state due to context cancelation
In shouldRunGopackages we would reset a goFile's metadata and pkgs in
advance of re-running go/packages. However, if we did not end up
running go/packages for whatever reason (read: we got canceled), the
goFile gets stuck in the unfortunate state of not belonging to any
packages because "pkgs" is empty. I think this leads to "no
CheckPackageHandle" errors, at least in relation to GetCachedPackage()
calls.

Fix by deferring the reset of goFile's metadata and pkgs until after
the go/packages call has succeeded.

Change-Id: I95aace85c026e1232b42cadee9e7772951c817d0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/193601
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-09-05 23:06:12 +00:00
..
browser
cache internal/lsp: avoid invalid state due to context cancelation 2019-09-05 23:06:12 +00:00
cmd all: skip more memory-intensive tests on linux-arm 2019-08-30 17:05:41 +00:00
debug internal/telemetry: add the ability to flush telemetry data 2019-08-21 16:29:56 +00:00
diff internal/lsp: add tests at the diff hook layer 2019-08-26 23:40:50 +00:00
fuzzy internal/lsp: add fuzzy completion matching 2019-08-14 16:13:50 +00:00
protocol x/tools/gopls: reimplement rpc logging at a lower level 2019-08-29 16:05:15 +00:00
snippet
source internal/lsp: turn on completion documentation by default 2019-09-05 03:53:08 +00:00
telemetry internal/lsp/cache: add additional spans for tracing 2019-09-05 21:33:45 +00:00
testdata internal/lsp: fix declarations in references 2019-09-05 03:51:44 +00:00
tests internal/lsp: fix declarations in references 2019-09-05 03:51:44 +00:00
code_action.go internal/lsp: initialize CodeActionProvider with supported actions 2019-08-28 21:14:09 +00:00
completion.go internal/lsp: turn on completion documentation by default 2019-09-05 03:53:08 +00:00
definition.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
diagnostics.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
folding_range.go internal/lsp: return only multiline ranges when lineFoldingOnly 2019-09-03 16:36:17 +00:00
format.go internal/lsp: use protocol.Range in completion items 2019-08-20 20:57:17 +00:00
general.go internal/lsp: turn on completion documentation by default 2019-09-05 03:53:08 +00:00
highlight.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
hover.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
link.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
lsp_test.go internal/lsp: turn on completion documentation by default 2019-09-05 03:53:08 +00:00
references.go internal/lsp: fix declarations in references 2019-09-05 03:51:44 +00:00
rename.go internal/lsp: add prepare rename support 2019-08-29 20:19:46 +00:00
reset_golden.sh
server.go internal/lsp: return only multiline ranges when lineFoldingOnly 2019-09-03 16:36:17 +00:00
signature_help.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
symbols.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
text_synchronization.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
util.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
watched_files.go internal/lsp: start handling watched file change events 2019-08-26 19:00:32 +00:00
workspace.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00