]> Cypherpunks repositories - gostls13.git/commit
cmd/go: relax validation for replacements for gopkg.in paths
authorBryan C. Mills <bcmills@google.com>
Thu, 19 Dec 2019 20:46:06 +0000 (15:46 -0500)
committerBryan C. Mills <bcmills@google.com>
Thu, 19 Dec 2019 22:16:18 +0000 (22:16 +0000)
commit5c6f42773cec9eb217e258e104ee058f67253f72
tree639fa0e7deb1dbdf54e7e042ef330939896eb854
parent0f834bb77e11d1ca1f06fc925f5bd7e44c7f4867
cmd/go: relax validation for replacements for gopkg.in paths

The 'go' command normally requires the 'go.mod' files for replacement
modules to have a major version compatible with the module they are
replacing.

However, prior to CL 206761, the 'go' command erroneously allowed
unversioned paths (which imply major version 0 or 1) to replace
'gopkg.in' paths with any major-version suffix.

An analysis of proxy.golang.org suggests that these replacements,
while uncommon, are not unheard-of. Rather than breaking the modules
that rely on them, we will continue to allow the erroneous replacement
paths for this particular pairing.

Updates #34254

Change-Id: Icb4e745981803edaa96060f17a8720a058219ab1
Reviewed-on: https://go-review.googlesource.com/c/go/+/212105
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modfetch/coderepo.go
src/cmd/go/testdata/script/mod_replace_gopkgin.txt