1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:05:02 -07:00
go/internal
Heschi Kreinick ef6787d357 internal/lsp: track and parse non-compiled go files
When packages.Load'ing cgo packages, the authored files show up in
GoFiles, and the generated files show up in CompiledGoFiles. We need the
AST and type information for the latter, since they're the only thing we
can type check. But we also need the contents (and column mapper) for
the authored file so that we can navigate into it.

Store GoFiles in package metadata and checked Packages. Parse the extra
files, just for their mappers. Refactor the View functions a little bit,
since there's only one place that actually needs to find the mapper for
a file.

Updates golang/go#35720.

Change-Id: I9f96872a9a592bf0e11da27ebd8976c6db8752c9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/208502
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-11-25 19:20:50 +00:00
..
apidiff all: fix more typos 2019-09-11 15:13:14 +00:00
fastwalk
gopathwalk internal/imports: cache things outside the mod cache 2019-10-21 20:45:41 +00:00
imports txtar: promote from internal 2019-11-19 22:48:55 +00:00
jsonrpc2 internal/lsp: cancel early 2019-10-22 07:49:31 +00:00
lsp internal/lsp: track and parse non-compiled go files 2019-11-25 19:20:50 +00:00
memoize internal/memoize: propagate cancellation 2019-11-12 23:22:37 +00:00
module imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
semver
span internal/span: support line directives 2019-11-25 19:20:43 +00:00
telemetry internal/telemetry: make the metrics tests external 2019-11-25 14:11:28 +00:00
testenv internal/testenv: reject the resolved 'go' command if it does not match runtime.GOROOT 2019-11-11 19:22:22 +00:00
tool tools/internal/tool: refactor tool.Main() for testabilty 2019-09-19 22:27:22 +00:00
xcontext internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00