1
0
mirror of https://github.com/golang/go synced 2024-10-01 03:28:32 -06:00
go/internal/lsp/cache
Pontus Leitzler f340ed3ae2 x/tools/gopls: add fallback to default GOPATH if missing
The "Organize imports" code action uses internal/imports that needs a
valid GOPATH set. Since Go 1.8 setting GOPATH manually is not required,
and if it isn't set gopls will sometimes fail to properly import
packages.

This CL sets GOPATH to the default if the env var GOPATH isn't set.

Fixes golang/go#33918.

Change-Id: Ib63a26a801e15af730197999de4d1d4901694a30
Reviewed-on: https://go-review.googlesource.com/c/tools/+/191600
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-08-30 08:22:54 +00:00
..
cache.go internal/lsp: remove the non context xlog path 2019-07-15 03:45:47 +00:00
check.go internal/lsp: unlabel context, log errors when canceled 2019-08-20 20:39:21 +00:00
external.go internal/lsp: split the telemetry library out 2019-08-15 21:28:02 +00:00
file.go internal/lsp: cache the *ast.File and *token.File on the package 2019-07-16 19:44:59 +00:00
gofile.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
load.go internal/lsp: unlabel context, log errors when canceled 2019-08-20 20:39:21 +00:00
modfile.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00
parse.go internal/lsp: unlabel context, log errors when canceled 2019-08-20 20:39:21 +00:00
pkg.go go/analysis: handle common nil pointers 2019-08-24 21:01:00 +00:00
session.go internal/lsp: start handling watched file change events 2019-08-26 19:00:32 +00:00
sumfile.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00
token.go internal/lsp: unlabel context, log errors when canceled 2019-08-20 20:39:21 +00:00
view.go x/tools/gopls: add fallback to default GOPATH if missing 2019-08-30 08:22:54 +00:00
watcher.go internal/lsp: fix deadlocks loading lots of files at once 2019-07-03 17:22:52 +00:00