]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: make QueryPattern consider current versions
authorJay Conrod <jayconrod@google.com>
Fri, 1 May 2020 19:30:58 +0000 (15:30 -0400)
committerJay Conrod <jayconrod@google.com>
Mon, 4 May 2020 16:50:30 +0000 (16:50 +0000)
commit1dcbd8dc58abf7319a8f557536e3b5158cba8ed7
tree395d203c4a0be27908d4680909c4724f99e45f65
parentb3c0fe1d14485d34acc402f795eff32b36d6c4e2
cmd/go/internal/modload: make QueryPattern consider current versions

QueryPattern will now look up the current version of a module (if any)
before invoking queryProxy. This changes the interpretation of some
patterns (like "upgrade") and avoids the need to download earlier
versions for earlier versions when the current version is
+incompatible.

Fixes #37574

Change-Id: I4089d6099236493df13a7f88a252b5e5e556d383
Reviewed-on: https://go-review.googlesource.com/c/go/+/231599
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/internal/modload/query.go
src/cmd/go/testdata/mod/example.com_incompatiblewithsub_v1.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/mod/example.com_incompatiblewithsub_v2.0.0+incompatible.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_get_prefer_incompatible.txt [new file with mode: 0644]