-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: TestScript/cgo_stale_precompiled fails when GOROOT_FINAL points to another Go tree but GOROOT isn't explicitly set #50893
Comments
I've learned it happens only when |
More findings, it seems this failure goes away if
|
If Probably a good first step would be to avoid the self-rebuild cycle (probably with something like https://go.dev/cl/378294, thanks @mvdan!). But I'm also learning that it's probably not a good idea to set |
Now that we understand the problem in #50892 better, it is clear my original reproduce attempt that only set GOROOT_FINAL explicitly, but did not set GOROOT explicitly, was misleading.
Agree. I think if it is possible, we should simply make it a fatal error if |
Change https://golang.org/cl/381854 mentions this issue: |
Change https://golang.org/cl/381834 mentions this issue: |
GoTool was added in CL 20967, and revised in CL 21292, for #14901. I don't fully understand what problem the GoTool function was added to solve: the discussion on that issue was pretty sparse, but it seems like when we run tests of GOROOT packages they always know their own location relative to GOROOT (and thus always know where to find the 'go' tool). Lacking that understanding, I don't want to change its behavior, but I do at least want to verify that it resolves to the real 'go' tool in the common case (running 'go test' on a package in GOROOT/src). For #50892 For #50893 Updates #14901 Change-Id: I06d831e6765be631dfc4854d7fddc3d27fc1de34 Reviewed-on: https://go-review.googlesource.com/c/go/+/381834 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: David Chase <[email protected]> Auto-Submit: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
At tip:
The
TestScript/cgo_stale_precompiled
test passes whenGOROOT_FINAL
is empty:But fails when non-empty:
The text was updated successfully, but these errors were encountered: