mirror of https://github.com/golang/go.git
internal/lsp/cache: disable GOPACKAGESDRIVER
In practice, we only support the go command, and now that we rely on the private packagesinternal APIs to set -mod and -modfile, GOPACKAGESDRIVER is actively broken. Forcibly disable it. Change-Id: I91f8c0d29fada2fe87ad9fdfec6ba8c5504c80cd Reviewed-on: https://go-review.googlesource.com/c/tools/+/268977 Trust: Heschi Kreinick <heschi@google.com> Run-TryBot: Heschi Kreinick <heschi@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
f6c1dd6914
commit
092357f697
|
|
@ -190,10 +190,14 @@ func (s *snapshot) config(ctx context.Context, inv *gocommand.Invocation) *packa
|
|||
verboseOutput := s.view.options.VerboseOutput
|
||||
s.view.optionsMu.Unlock()
|
||||
|
||||
// Forcibly disable GOPACKAGESDRIVER. It's incompatible with the
|
||||
// packagesinternal APIs we use, and we really only support the go commmand
|
||||
// anyway.
|
||||
env := append(append([]string{}, inv.Env...), "GOPACKAGESDRIVER=off")
|
||||
cfg := &packages.Config{
|
||||
Context: ctx,
|
||||
Dir: inv.WorkingDir,
|
||||
Env: inv.Env,
|
||||
Env: env,
|
||||
BuildFlags: inv.BuildFlags,
|
||||
Mode: packages.NeedName |
|
||||
packages.NeedFiles |
|
||||
|
|
|
|||
Loading…
Reference in New Issue