-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: crash during loading in dirAndRoot (vendor-related) #65415
Comments
@hyangah The "failed to run go env" part appears to be from logic in vscode-go (in src/goModules.ts). |
We managed to get the complete stack and the actual values in the assertion failure:
it seems like the immediate problem is the "root + path = dir" invariant is violated because of a missing "vendor" segment. cc @matloob |
I'm surprised that |
Yeah I think we should figure out why vendoredImportPath is being called. Sam, would you have time to do some debugging of this? |
Sure. I can try to debug the issue on my machine. |
We debugged this to be an issue with conflicting Go versions. I had one default installation of Go and one that I built from the github Repo. This is what fixed it for me:
Optionally: This fixed this issue and allowed gopls to work perfectly. |
@samthanawalla encountered this crash while using the web-based VS Code with a Google VM as the backend.
The error indicates a crash propagated via gopls and go/packages up from the go command, specifically the dirAndRoot function:
In addition the VS Code UI showed this truncated error:
Sorry there's not much to go on yet. I wonder whether the remote machine has as GOPACKAGESDRIVER env var (or $PATH executable).
The text was updated successfully, but these errors were encountered: