1
0
mirror of https://github.com/golang/go synced 2024-11-19 00:44:40 -07:00
go/internal/lsp/cache
Rebecca Stambler 5ae6a9745e internal/lsp: track missing imports, re-running packages.Load
This change marks any unresolved packages discovered as imports by
go/packages.Load. It re-runs go/packages.Load for any package with
missing imports, which will result in the LSP registering changes in
dependencies.

However, this means that we re-run go/packages.Load on
package's with unresolved imports much more than we normally would, so
it may result in a slowdown or unexpected behavior. I'm not sure if this
is necessarily the correct approach here.

Updates golang/go#32232

Change-Id: Id611fa1876e42c88ca2c3e4db30da66dc66945fc
Reviewed-on: https://go-review.googlesource.com/c/tools/+/180537
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-06-10 18:15:09 +00:00
..
cache.go internal/lsp: change file system to allow lazy reads 2019-06-06 01:09:34 +00:00
check.go internal/lsp: enable "ignoreFuncBodies" and fix caching 2019-06-10 18:14:45 +00:00
external.go internal/lsp: remove source.FileContent 2019-06-06 05:02:23 +00:00
file.go internal/lsp: remove source.FileContent 2019-06-06 05:02:23 +00:00
gofile.go internal/lsp: track missing imports, re-running packages.Load 2019-06-10 18:15:09 +00:00
load.go internal/lsp: track missing imports, re-running packages.Load 2019-06-10 18:15:09 +00:00
modfile.go internal/lsp: add modfile, sumfile structs, require Go files for diagnostics 2019-05-24 21:02:28 +00:00
parse.go internal/lsp: enable "ignoreFuncBodies" and fix caching 2019-06-10 18:14:45 +00:00
pkg.go internal/lsp: fix some issues with trimming ASTs 2019-06-07 20:08:10 +00:00
session.go internal/lsp: add an implementation for textDocument/didSave 2019-06-10 16:29:40 +00:00
sumfile.go internal/lsp: add modfile, sumfile structs, require Go files for diagnostics 2019-05-24 21:02:28 +00:00
view.go internal/lsp: track missing imports, re-running packages.Load 2019-06-10 18:15:09 +00:00
watcher.go internal/lsp: add file watching and use it to trigger invalidations 2019-05-24 14:03:12 +00:00