-
Notifications
You must be signed in to change notification settings - Fork 791
New issue
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
Tools (gopls, dlv) need recompiling to work with go version go1.22.5 darwin/arm64 #3637
Comments
Change https://go.dev/cl/638475 mentions this issue: |
Is there a reason that you need to build a tool in GOPATH mode? We require tools to be built in module mode. |
Our entire codebase is organized as a large monorepository with dependencies by source code, not by modules. External dependencies are vendored under one root go.mod.
I looked through the plugin code and didn't find any other places that would change the behavior with the returned |
@Viknet It's ok to use Gopls or Delve built with |
It is not ok for us. There are several issues:
Overall, I'm only concerned about the useless warning which is popping on every workspace load. The button "Update tools" does nothing when I could suggest other ways to fix this:
|
@hyangah gentle ping |
Another use case where this warning is spurious and annoying: workspaces where |
I think a setting to disable this check/warning is reasonable, or maybe just disabling it for tools that have an alternative set. The team seems pretty swamped at the moment so if this is an urgent issue for you I suggest submitting a CL (or PR). That being said, @Viknet you may want to start transitioning away from GOPATH mode. GOPATH mode was deprecated four years ago (in 1.16). While it may not ever be removed completely (unless Go 2 happens), there is a clear trend towards new features and updates not being available in GOPATH mode. I can't speak for Go or vscode-go (I'm just a community contributor who can manage GH issues) but it seems to me that the situation will only get worse for GOPATH mode. |
Hi, we're running into this issue on our Go monorepo as well. Similarly to @zombiezen we have gopls configured as a shell script that performs automatic updates + has some performance related patches discussed with gopls maintainers here. Since we tightly control Go version and gopls version we'd also love a configuration option that would allow an opt-out for |
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.22.5 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.0.45.0
Go: Locate Configured Go Tools
command.Tools Configuration
Environment
GOBIN: undefined
toolsGopath:
gopath: /Users/viknet/go
GOROOT: /Users/viknet/.ya/tools/v4/6608868508
PATH: /Users/viknet/.ya/tools/v4/6608868508/bin:/Users/viknet/.n/bin:/Users/viknet/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/Users/viknet/Library/Application Support/JetBrains/Toolbox/scripts:/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:/usr/local/go/bin:/usr/local/munki:/Users/viknet/.cargo/bin
PATH (vscode launched with): /Users/viknet/.n/bin:/Users/viknet/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/Users/viknet/Library/Application Support/JetBrains/Toolbox/scripts:/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:/usr/local/go/bin:/usr/local/munki:/Users/viknet/.cargo/bin
Tools
Go env
Workspace Folder (devtools/dummy_arcadia/cp): /Users/viknet/arcadia2/devtools/dummy_arcadia/cp
Share the Go related settings you have added/edited
Describe the bug
We are using patched tools
gopls
anddlv
built in GOPATH mode.Tools version output in our case:
Due to the fact that the output consists of a single line, the calculation of the version fails at this line, and plugin shows warning message
Tools (gopls, dlv) need recompiling to work with go version go1.22.5 darwin/arm64
every time workspace is loaded.I'm proposing to change that line to
With this patch I'm getting reasonable behavior:
Go: Locate Configured Go Tools
Tools Configuration
Environment
GOBIN: undefined
toolsGopath:
gopath: /Users/viknet/go
GOROOT: /Users/viknet/.ya/tools/v4/6608868508
PATH: /Users/viknet/.ya/tools/v4/6608868508/bin:/Users/viknet/.n/bin:/Users/viknet/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/Users/viknet/Library/Application Support/JetBrains/Toolbox/scripts:/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:/usr/local/go/bin:/usr/local/munki:/Users/viknet/.cargo/bin
PATH (vscode launched with): /Users/viknet/.n/bin:/Users/viknet/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/Users/viknet/Library/Application Support/JetBrains/Toolbox/scripts:/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:/usr/local/go/bin:/usr/local/munki:/Users/viknet/.cargo/bin
Tools
Go env
Workspace Folder (devtools/dummy_arcadia/cp): /Users/viknet/arcadia2/devtools/dummy_arcadia/cp
The text was updated successfully, but these errors were encountered: