Closed williandandrade closed 1 month ago
related to: https://github.com/golang/vscode-go/issues/3412
Use go.toolsManagement.go
setting to tell the extension to use a newer version of go when building tools. https://github.com/golang/vscode-go/wiki/settings#gotoolsmanagementgo
Or, manually install the right version of gopls and tools suitable for go 1.18.
Will update README that users need go1.19+ if they want the extension to handle tools installation.
Change https://go.dev/cl/588757 mentions this issue: extension/src: require go1.19+ for tools installation
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
* Run `go version` to get version of Go from _the VS Code integrated terminal_. - `go version go1.18 darwin/arm64` * Run `gopls -v version` to get version of Gopls from _the VS Code integrated terminal_. - N/A * Run `code -v` or `code-insiders -v` to get version of VS Code or VS Code Insiders. - `1.89.1` - `dc96b837cf6bb4af9cd736aa3af08cf8279f7685` - `arm64` * Check your installed extensions to get the version of the VS Code Go extension - `v0.41.4` * Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > `Go: Locate Configured Go Tools` command. ```markdown # Tools Configuration ## Environment GOBIN: undefined toolsGopath: gopath: /Users/wa/.asdf/installs/golang/1.18/packages GOROOT: /Users/wa/.asdf/installs/golang/1.18/go PATH: /Users/wa/.asdf/installs/golang/1.18/go/bin:/Users/wa/google-cloud-sdk/bin:/Users/wa/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/Users/wa/google-cloud-sdk/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/go/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/wa/Library/Application Support/JetBrains/Toolbox/scripts:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/bin:/opt/homebrew/sbin PATH (vscode launched with): /Users/wa/google-cloud-sdk/bin:/Users/wa/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/Users/wa/google-cloud-sdk/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/go/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/wa/Library/Application Support/JetBrains/Toolbox/scripts:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/bin:/opt/homebrew/sbin ## Tools go: /Users/wa/.asdf/installs/golang/1.18/go/bin/go: go version go1.18 darwin/arm64 gopls: not installed gotests: /Users/wa/.asdf/installs/golang/1.18/go/bin/gotests (version: v1.6.0 built with go: go1.18) gomodifytags: /Users/wa/.asdf/installs/golang/1.18/go/bin/gomodifytags (version: v1.16.0 built with go: go1.18) impl: /Users/wa/.asdf/installs/golang/1.18/go/bin/impl (version: v1.1.0 built with go: go1.18) goplay: /Users/wa/.asdf/installs/golang/1.18/go/bin/goplay (version: v1.0.0 built with go: go1.18) dlv: /Users/wa/.asdf/installs/golang/1.18/go/bin/dlv (version: v1.22.1 built with go: go1.18) staticcheck: /Users/wa/.asdf/installs/golang/1.18/packages/bin/staticcheck (version: v0.3.3 built with go: go1.18) ## Go env Workspace Folder (go): /Users/wa/projects/go GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/Users/wa/Library/Caches/go-build" GOENV="/Users/wa/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/wa/.asdf/installs/golang/1.18/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/wa/.asdf/installs/golang/1.18/packages" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/Users/wa/.asdf/installs/golang/1.18/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/Users/wa/.asdf/installs/golang/1.18/go/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.18" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/wa/projects/go/go.mod" GOWORK="" 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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bn/6lg_h65j28l9wklnqv94jp9c0000gn/T/go-build3642746910=/tmp/go-build -gno-record-gcc-switches -fno-common" ```
Describe the bug
Can't use the extension with Go 1.18 because
gopls@latest
have a dependency toatomic.Int32
.Steps to reproduce the behavior: