-
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
go/build: Passes bad $GOROOT to go list
subprocess
#35056
Comments
It seems |
This only triggers with modules, not with GOPATH ( Real world code that broke because of this: https://github.com/google/ko |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The fact that the fmt.Printf("runtime.GOROOT=%v\n", runtime.GOROOT()) line prints
suggests that this isn't actually coming from |
I'm unable to reproduce the reported behavior.
Is it possible that you have a |
I have no GOROOT in environment, only GOFLAGS=-trimpath in ~/.config/go/env. As far as I can understand, the problem comes from go/build using I'll try to make an effort to reproduce inside a reproducible container or something. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Successful run, with ImportDir returning metadata about the package
example.com/m
that I just created.What did you see instead?
The
go list
subprocess is spawned with a brokenGOROOT=go
in environment, an explicitly set$GOROOT
prevents the child from deducing GOROOT from/proc/self/exe
, and this causes it to fail.Confirmation that
$GOROOT
is passed:The text was updated successfully, but these errors were encountered: