-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go get hits proxy to check retracted versions for transitive dependencies too much #42185
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
Comments
Thanks for opening this. I'll look into it and see if we can speed things up. I don't think retraction should be gated by a flag in I think most of the delay here is coming from checking retractions on modules not being upgraded, so we can print out a warning at the end, prompting the user to upgrade. That's probably not worth taking a lot of time though; the same information is available from |
I don't know if this is hitting the same issue, but I also find that
|
@rogpeppe, |
In this case, there is only one newly added package in both cases, so ISTM that |
Change https://golang.org/cl/269019 mentions this issue: |
Change https://golang.org/cl/270858 mentions this issue: |
Previously, 'go get' loaded retractions for every module in the build list, which took a long time and usually wasn't helpful. This rolls forward CL 269019, which was reverted in CL 270521. The new revision adds a call to modload.ListModules at the end of 'go get' to ensure .info files are cached for everything in the build list. Fixes #42185 Change-Id: I684f66c5e674384d5a0176fbc8317e5530b8a915 Reviewed-on: https://go-review.googlesource.com/c/go/+/270858 Trust: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
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?
This is a follow up to an exchange with @jayconrod in
#tools
on Slack:https://gophers.slack.com/archives/C0VPK4Z5E/p1603464236390000
Consider the following:
Running the above with a local
GOMODCACHE
that is already "warm" (i.e. fully populated from a previousgo mod download
wherecuelang.org/go@v0.2.2
is a dependency).go get
takes too longgo get
's also take too longThe time on subsequent
go get
's appears to be taken checking version lists of transitive dependencies:It is unclear why the initial
go get
takes almost twice as long.Also, if you follow, in real time, the output of
go get -x cuelang.org/go@v0.2.2
, assuming the output is representative of the real time execution ofgo get
, the checking of the version lists of the transitive dependencies appears to happen in serial rather than "as concurrently as possible". (It could of course be that the proxy is doing some sort of rate limiting, but I find that harder to believe)What did you expect to see?
Fast execution of all the above commands, because my
GOMODCACHE
is already warm.What did you see instead?
The above.
Per our discussion, this feels like a fairly significant backwards step in terms of "performance". If this is all attributable to the checking of retracted versions, then I think we need to consider that check being a separate command rather than magically happening as part of other commands.
cc @jayconrod @bcmills @matloob
The text was updated successfully, but these errors were encountered: