]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go/internal/modload: do not resolve an arbitrary version for 'go list --versions'
authorBryan C. Mills <bcmills@google.com>
Fri, 26 Feb 2021 22:40:18 +0000 (17:40 -0500)
committerBryan C. Mills <bcmills@google.com>
Tue, 2 Mar 2021 20:29:03 +0000 (20:29 +0000)
commit2a2f99eefb70a66ecb9560a61b5cf23a5ca02ecb
tree38ad7288a609da0ca3ff4fb7e8569a1dd98966f6
parentb65091c11d711ff3b01cd25393305410e1b0b377
cmd/go/internal/modload: do not resolve an arbitrary version for 'go list --versions'

If we don't actually require the listed module, we previously
implicitly resolved "latest", but also (erroneously) forgot to apply
exclusions and retractions for it. But there is really no need to
resolve "latest" in this case at all — now we omit the version from
the reported module info entirely.

Fixes #44296

Change-Id: Id595f52f597c7213bd65b73bf066a678d9e1d694
Reviewed-on: https://go-review.googlesource.com/c/go/+/297150
Trust: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modload/build.go
src/cmd/go/internal/modload/list.go
src/cmd/go/testdata/script/mod_proxy_https.txt
src/cmd/go/testdata/script/mod_retract_versions.txt