go: x/tools/gopls: 0.4.4 undeclared name errors on valid code
What version of Go are you using (go version)?
$ go version go version go1.14.6 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/andig/Library/Caches/go-build" GOENV="/Users/andig/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/andig/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/Cellar/go/1.14.6/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.14.6/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/andig/htdocs/mbmd/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/73/89ycv7qn51j4kbm04jsz9b840000gn/T/go-build854369359=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Upgrade gopls when prompted by vscode
What did you expect to see?
Smooth coding as before
What did you see instead?
Lots of undeclared name: xyz errors in vscode and generally high CPU usage when using the go plugin. The code itself is fine and compiles on the command line.
Raising here as this happened immediately after upgrading gopls from 0.4.3 to 0.4.4. Tools have been reinstalled.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (13 by maintainers)
gopls 0.4.4 consumes tons of memory!
gopls 0.4.4 consumes tons of memory!
I’m also having issues with gopls after upgrading to 0.4.4 today. Autocompletion and definitions are gone for me (except for basic text completion), and no syntax highlighting/errors show up at all no matter what I type. In my case, gopls does not have high CPU usage.