]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go: in 'go get', only load retractions for resolved versions
authorJay Conrod <jayconrod@google.com>
Tue, 10 Nov 2020 20:48:37 +0000 (15:48 -0500)
committerJay Conrod <jayconrod@google.com>
Wed, 18 Nov 2020 15:31:11 +0000 (15:31 +0000)
commitd3072b838366e7cc6b9af9767d3648f6e62bae8b
treefac3c07df5ef9a1650f72e6cf35d7e20918c8353
parentb194b5151fdac0c33da0b7359c97f92781ab3b5e
cmd/go: in 'go get', only load retractions for resolved versions

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>
src/cmd/go/internal/modget/get.go
src/cmd/go/internal/modload/build.go
src/cmd/go/internal/modload/modfile.go
src/cmd/go/testdata/mod/example.com_retract_ambiguous_nested_v1.9.0-bad.txt [new file with mode: 0644]
src/cmd/go/testdata/mod/example.com_retract_ambiguous_other_v1.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/mod/example.com_retract_ambiguous_v1.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_get_retract.txt
src/cmd/go/testdata/script/mod_get_retract_ambiguous.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_retract_rationale.txt
src/cmd/go/testdata/script/mod_retract_rename.txt