aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modfetch/coderepo_test.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2019-10-28 16:32:24 -0400
committerBryan C. Mills <bcmills@google.com>2019-11-05 21:16:50 +0000
commit14a133fe7791cdad14dc55332a506801fa8ea5f9 (patch)
tree6888e9a52e9e1d793c26ec1e5259fe84866580a9 /src/cmd/go/internal/modfetch/coderepo_test.go
parent81559af51a69d9f2c1c45d78efbe3cd7a4b9e3cb (diff)
downloadgo-14a133fe7791cdad14dc55332a506801fa8ea5f9.tar.gz
go-14a133fe7791cdad14dc55332a506801fa8ea5f9.zip
cmd/go/internal/modfetch: prune +incompatible versions more aggressively
codeRepo.Versions previously checked every possible +incompatible version for a 'go.mod' file. That is wasteful and counterproductive. It is wasteful because typically, a project will adopt modules at some major version, after which they will (be required to) use semantic import paths for future major versions. It is counterproductive because it causes an accidental '+incompatible' tag to exist, and no compatible tag can have higher semantic precedence. This change prunes out some of the +incompatible versions in codeRepo.Versions, eliminating the “wasteful” part but not all of the “counterproductive” part: the extraneous versions can still be fetched explicitly, and proxies may include them in the @v/list endpoint. Updates #34165 Updates #34189 Updates #34533 Change-Id: Ifc52c725aa396f7fde2afc727d0d5950acd06946 Reviewed-on: https://go-review.googlesource.com/c/go/+/204439 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/modfetch/coderepo_test.go')
-rw-r--r--src/cmd/go/internal/modfetch/coderepo_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modfetch/coderepo_test.go b/src/cmd/go/internal/modfetch/coderepo_test.go
index f6f7a352453..39830948fb0 100644
--- a/src/cmd/go/internal/modfetch/coderepo_test.go
+++ b/src/cmd/go/internal/modfetch/coderepo_test.go
@@ -637,7 +637,7 @@ var codeRepoVersionsTests = []struct {
{
vcs: "git",
path: "github.com/rsc/vgotest1",
- versions: []string{"v0.0.0", "v0.0.1", "v1.0.0", "v1.0.1", "v1.0.2", "v1.0.3", "v1.1.0", "v2.0.0+incompatible"},
+ versions: []string{"v0.0.0", "v0.0.1", "v1.0.0", "v1.0.1", "v1.0.2", "v1.0.3", "v1.1.0"},
},
{
vcs: "git",