go/internal/lsp/cache
Heschi Kreinick b894a3290f all: use explicit -mod, -modfile fields for gocommand.Invocation
Build flags, -mod, and -modfile are all accepted by disjoint go command
verbs. Mixing them together had the effect of forcing gocommand users to
figure out which went where themselves, which was annoying and
error-prone. Add ModFlag and ModFile fields to Invocation and update all
uses to use them.

go/packages has a BuildFlags field that's bad for the same reason. Add
private modFlag and modFile fields that forward to the corresponding
Invocation fields.

imports.ProcessEnv gets the same treatment.

Fixes golang/go#41826.

Change-Id: If74d19146e9e62930d7c34f40859c27c25566c4e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/263213
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-10-19 17:57:15 +00:00
..
analysis.go internal/memoize: switch from GC-driven to explicit deletion 2020-08-10 19:02:17 +00:00
cache.go internal/lsp/cache: populate URI on files with errors 2020-09-21 18:19:13 +00:00
check.go internal/lsp: move the workspaceMode into the snapshot 2020-10-12 19:26:20 +00:00
error_test.go internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
errors.go internal/lsp: add support for RelatedInformation in diagnostics 2020-09-04 18:57:47 +00:00
imports.go all: use explicit -mod, -modfile fields for gocommand.Invocation 2020-10-19 17:57:15 +00:00
keys.go internal/lsp: decouple client and server debug 2020-06-11 13:49:48 +00:00
load.go all: use explicit -mod, -modfile fields for gocommand.Invocation 2020-10-19 17:57:15 +00:00
mod.go all: use explicit -mod, -modfile fields for gocommand.Invocation 2020-10-19 17:57:15 +00:00
mod_tidy.go internal/lsp: move the workspaceMode into the snapshot 2020-10-12 19:26:20 +00:00
os_darwin.go internal/lsp: add a mutex around the view's options 2020-04-02 16:41:49 +00:00
os_windows.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
parse.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
parse_test.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
pkg.go internal/lsp: prepare for deletion of view.modURI 2020-09-28 20:19:43 +00:00
session.go internal/lsp: move the workspaceMode into the snapshot 2020-10-12 19:26:20 +00:00
snapshot.go all: use explicit -mod, -modfile fields for gocommand.Invocation 2020-10-19 17:57:15 +00:00
view.go internal/lsp: fix nil pointer exception in initialization 2020-10-19 15:59:33 +00:00
view_test.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00