-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: avoid invoking git for standard library queries #30885
Comments
Another bunch of errors from x/exp: https://build.golang.org/log/546c34306ce262ec806cd8ccda7462f0ce503ad6 (Look for "could not determine GOARCH and Go compiler") |
Related to #29452 |
This is happening when we load the build list. The first thing the Go command does in module mode (whether running It might be possible for us to limit this behavior, based on the command line arguments, but it would add a lot of complexity, and I think it would only be feasible for the main module and the standard library. It doesn't seem worth it.
|
Change https://golang.org/cl/168118 mentions this issue: |
GOPROXY is a good idea. The builders already have GOPROXY setup for them; CL 168118 passes that to the device environment. Thank you, I believe that solves the issue with running go list on android. I still believe go list queries for std and the main module are common enough to do something here, but I'll leave that discussion for #29452. |
Android devices don't have git available, so many go tool commands that fetch dependencies fail. Builders already have a GOPROXY available, so pass that along to the device environment. Updates #30885 Change-Id: Id0d2338932f0cd7de4d95d9e0ca9b79d29336ffe Reviewed-on: https://go-review.googlesource.com/c/go/+/168118 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
Removed git, then
What did you expect to see?
No error
What did you see instead?
An error about missing git.
Queries such as the above are issued by go/packages in module mode, which is breaking many tests on GOOS=android where git is not installed. See x/tools: https://build.golang.org/log/763e5ef04fc3679a903b8cd85a7e0ececcdd15b69.
It seems to me it should be possible to avoid downloading dependencies and invoking git when querying the standard library.
The text was updated successfully, but these errors were encountered: