Skip to content

x/tools/gopls: getting code actions from "go" in vendor directory when i save file and save slowly #1760

@cgyFight

Description

@cgyFight

What version of Go are you using (go version)?

$ go version
1.16.2

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

mac

go env Output
$ go env
```
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.16.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rf/1744zvy931d53cz_b2wd2sn11r4whl/T/go-build369641151=/tmp/go-build -gno-record-gcc-switches -fno-common"
```

What did you do?

when save my modify file in vendor dir, frequentyly pop getting code actions from "go" in vendor directory, and very slowly

but if i do that not in vendor dir, it save fast and not pop the hint

i try to set GO111MODULE to off/on/auto in vscode like that:

"go.toolsEnvVars": {
        "GO111MODULE": "off"
        // "GO111MODULE": "auto"
    },

but none of the problems are solved

What did you expect to see?

save fast in vendor dir

What did you see instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions