We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
go version go1.18 darwin/arm64
gopls -v version
code -v
code-insiders -v
1.89.1
dc96b837cf6bb4af9cd736aa3af08cf8279f7685
arm64
v0.41.4
Go: Locate Configured Go Tools
# 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"
Can't use the extension with Go 1.18 because gopls@latest have a dependency to atomic.Int32.
gopls@latest
atomic.Int32
2024-05-27 12:56:41.704 [info] Tools environment: GOPATH=/Users/wa/.asdf/installs/golang/1.18/go 2024-05-27 12:56:41.704 [info] Installing 1 tool at /Users/wa/.asdf/installs/golang/1.18/go/bin 2024-05-27 12:56:41.704 [info] gopls 2024-05-27 12:56:41.704 [info] 2024-05-27 12:56:42.418 [info] Installing golang.org/x/tools/gopls@latest FAILED 2024-05-27 12:56:42.418 [info] { "code": 2, "killed": false, "signal": null, "cmd": "/Users/wa/.asdf/installs/golang/1.18/go/bin/go install -v golang.org/x/tools/gopls@latest", "stdout": "", "stderr": "golang.org/x/tools/gopls/internal/cache\n# golang.org/x/tools/gopls/internal/cache\n../../.asdf/installs/golang/1.18/go/pkg/mod/golang.org/x/tools/gopls@v0.15.3/internal/cache/analysis.go:389:23: undefined: atomic.Int64\n../../.asdf/installs/golang/1.18/go/pkg/mod/golang.org/x/tools/gopls@v0.15.3/internal/cache/analysis.go:525:25: undefined: atomic.Int32\n../../.asdf/installs/golang/1.18/go/pkg/mod/golang.org/x/tools/gopls@v0.15.3/internal/cache/analysis.go:526:25: undefined: atomic.Int32\n" } 2024-05-27 12:56:42.421 [info] 2024-05-27 12:56:42.421 [info] 1 tools failed to install. 2024-05-27 12:56:42.421 [info] gopls: failed to install gopls(golang.org/x/tools/gopls@latest): Error: Command failed: /Users/wa/.asdf/installs/golang/1.18/go/bin/go install -v golang.org/x/tools/gopls@latest golang.org/x/tools/gopls/internal/cache # golang.org/x/tools/gopls/internal/cache ../../.asdf/installs/golang/1.18/go/pkg/mod/golang.org/x/tools/gopls@v0.15.3/internal/cache/analysis.go:389:23: undefined: atomic.Int64 ../../.asdf/installs/golang/1.18/go/pkg/mod/golang.org/x/tools/gopls@v0.15.3/internal/cache/analysis.go:525:25: undefined: atomic.Int32 ../../.asdf/installs/golang/1.18/go/pkg/mod/golang.org/x/tools/gopls@v0.15.3/internal/cache/analysis.go:526:25: undefined: atomic.Int32
The text was updated successfully, but these errors were encountered:
related to: #3412
Sorry, something went wrong.
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.
go.toolsManagement.go
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
extension/src: require go1.19+ for tools installation
1d1fe76
No branches or pull requests
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.go version go1.18 darwin/arm64
gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.1.89.1
dc96b837cf6bb4af9cd736aa3af08cf8279f7685
arm64
v0.41.4
Go: Locate Configured Go Tools
command.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:
The text was updated successfully, but these errors were encountered: