Skip to content
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

go binary not found even though PATH and even GOROOT is maintained correctly - plugin not working with latest 1.24 version #3688

Open
rufreakde opened this issue Feb 20, 2025 · 2 comments
Milestone

Comments

@rufreakde
Copy link

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.24.0 darwin/arm64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.97.2 e54c774e0add60467559eb0d1e229c6452cf8447 arm64
  • Check your installed extensions to get the version of the VS Code Go extension
    • Version 0.44.0
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

Image

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.
"go.gopath": "/Users/d070210/go",
"go.goroot": "opt/homebrew/Cellar/go/1.24.0/libexec",
"go.testTags": "integrationtesting",

Describe the bug

My local setup always worked but somehow it stoped. Now I can run ginkgo tests but my intellisence and everything within vscode doesnt work. go commands work like a charm. GOROOT and PATH contain everything needed

Steps to reproduce the behavior:

  1. Go to 'start vscode'
  2. See error

Image

where go command results in: "/opt/homebrew/Cellar/go/1.24.0/libexec/bin/go"

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.

zshrc:

export GOPATH=$HOME/go
export GOROOT=/opt/homebrew/Cellar/go/$(ls /opt/homebrew/Cellar/go)/libexec

export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@gopherbot gopherbot added this to the Untriaged milestone Feb 20, 2025
@rufreakde
Copy link
Author

okay after downgrading again to version 1.23.6 everything worked again. Seems like the plugin is not working with latest stable version!

@rufreakde rufreakde changed the title go binary not found even though PATH and even GOROOT is maintained correctly go binary not found even though PATH and even GOROOT is maintained correctly - plugin not working with latest 1.24 version Feb 21, 2025
@findleyr
Copy link
Member

@rufreakde the plugin does work with the latest version of Go. The version of Go should not matter here, as the error is saying that the Go binary itself could not be found. Can you try upgrading again? I suspect that the downgrade may have adjusted your PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants