1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:48:32 -06:00
go/internal/lsp
Muir Manders 63f37bb4d3 internal/lsp: fix some cases of stuck files
If typeCheck() returned an error, we could get into a state where a
package had an entry in the pcache, but the package's files had an
empty "pkgs" map. When we got a DidChange event for one of the files,
no packages would get invalidated since the file's "pkgs" was
empty. This resulted in the cached typeCheck() error persisting
indefinitely. Fix by never caching pcache entries on error.

An easy way to reproduce the problem was to delete the package name
from a file. For example, edit "package foo" to be just
"package". This caused the package to get stuck with an "AST for %s
has an invalid position" error.

Change-Id: I330bf9e419852dffa0f2dee94b56226367488dd1
GitHub-Last-Rev: 18be7078521b942694c76f799a2d520eee47167d
GitHub-Pull-Request: golang/tools#135
Reviewed-on: https://go-review.googlesource.com/c/tools/+/185839
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
2019-07-12 18:43:07 +00:00
..
browser internal/lsp: add version and bug commands 2019-05-11 04:16:02 +00:00
cache internal/lsp: fix some cases of stuck files 2019-07-12 18:43:07 +00:00
cmd internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00
debug internal/lsp: add prometheus exporting of all metrics 2019-07-11 17:26:14 +00:00
diff internal/lsp: enable incrementalSync by default 2019-06-26 20:40:24 +00:00
fuzzy internal/lsp/fuzzy: add fuzzy matching library 2019-07-03 21:24:19 +00:00
protocol internal/lsp: update the generated lsp protocol 2019-07-11 19:11:10 +00:00
snippet internal/lsp: introduce snippet builder object 2019-04-25 18:37:29 +00:00
source internal/lsp: reduce trace package to minimal StartSpan for now 2019-07-11 17:25:55 +00:00
telemetry internal/lsp: reduce trace package to minimal StartSpan for now 2019-07-11 17:25:55 +00:00
testdata internal/lsp: support hover for *ast.ImportSpec 2019-07-11 17:06:56 +00:00
tests internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00
xlog internal/lsp: add the ability to log back to the client 2019-04-01 16:22:08 +00:00
code_action.go internal/lsp, internal/imports: use the internal goimports library 2019-07-01 19:45:22 +00:00
completion.go internal/lsp: add documentation to completion items 2019-07-09 19:19:00 +00:00
definition.go internal/lsp: attach documentation to signature help 2019-06-06 17:46:28 +00:00
diagnostics.go internal/lsp: plumb suggested fixes through the LSP 2019-06-26 21:02:18 +00:00
format.go internal/lsp: handle err in formatRange 2019-06-27 22:00:10 +00:00
general.go internal/lsp: add documentation to completion items 2019-07-09 19:19:00 +00:00
highlight.go internal/lsp: separate refactorings out of memoization CL 2019-06-25 16:04:30 +00:00
hover.go internal/lsp: remove the unused function 'markupContent'. 2019-07-08 17:12:32 +00:00
link.go internal/lsp: separate refactorings out of memoization CL 2019-06-25 16:04:30 +00:00
lsp_test.go internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00
references.go internal/lsp: include declaration for references 2019-07-03 18:39:24 +00:00
rename.go internal/lsp: separate refactorings out of memoization CL 2019-06-25 16:04:30 +00:00
reset_golden.sh internal/lsp: fix definition tests to use golden files 2019-05-10 21:06:55 +00:00
server.go internal/lsp: update the generated lsp protocol 2019-07-11 19:11:10 +00:00
signature_help.go internal/lsp: reply with nil, rather than empty, signature help 2019-06-08 02:21:20 +00:00
symbols.go internal/lsp: reduce trace package to minimal StartSpan for now 2019-07-11 17:25:55 +00:00
text_synchronization.go internal/lsp: reduce trace package to minimal StartSpan for now 2019-07-11 17:25:55 +00:00
util.go internal/span: change URI.Filename so it just returns the filename 2019-06-10 21:39:43 +00:00
workspace.go internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00