1
0
mirror of https://github.com/golang/go synced 2024-10-01 05:38:32 -06:00
go/internal/lsp/cmd
Rebecca Stambler 3cbd95df51 internal/lsp: support a file belonging to multiple packages
This change adds supports for a package belonging to multiple files.
It requires additional packages.Loads for all of the packages to which a
file belongs (for example, if a non-test file also belongs to a package's
test variant).

For now, we re-run go/packages.Load for each file we open, regardless of
whether or not we already know about it.

This solves the issue of packages randomly belonging to a test or not.
Follow-up work needs to be done to support multiple packages in
references, rename, and diagnostics.

Fixes golang/go#32791
Fixes golang/go#30100

Change-Id: I0a5870a05825fc16cc46d405ef50c775094b0fbb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/183628
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-06-26 17:56:19 +00:00
..
check_test.go internal/span: change URI.Filename so it just returns the filename 2019-06-10 21:39:43 +00:00
check.go internal/lsp: fix race in delivering diagnostics to the command line client 2019-05-20 19:38:31 +00:00
cmd_race_test.go internal/lsp: extract the common test logic 2019-04-22 16:50:02 +00:00
cmd_test.go internal/lsp: add identifier renaming 2019-06-19 21:54:42 +00:00
cmd.go internal/span: change URI.Filename so it just returns the filename 2019-06-10 21:39:43 +00:00
definition_test.go internal/lsp: support a file belonging to multiple packages 2019-06-26 17:56:19 +00:00
definition.go internal/lsp: add shutdown handling 2019-05-15 23:16:32 +00:00
export_test.go internal/lsp: refactor query definition test to allow adding a new test 2019-03-18 20:06:54 +00:00
format_test.go internal/span: change URI.Filename so it just returns the filename 2019-06-10 21:39:43 +00:00
format.go internal/span: change URI.Filename so it just returns the filename 2019-06-10 21:39:43 +00:00
info.go internal/lsp: move PrintVersionInfo to the debug package 2019-06-03 15:29:06 +00:00
query.go internal/lsp: fix query cmd usage 2019-04-22 18:06:03 +00:00
serve.go internal/lsp: remove the redundant Server.Run() call. 2019-06-19 15:21:02 +00:00