]> Cypherpunks repositories - gostls13.git/commit
cmd/go: assume Go 1.16 semantics uniformly for unversioned modules
authorBryan C. Mills <bcmills@google.com>
Wed, 7 Apr 2021 20:17:08 +0000 (16:17 -0400)
committerBryan C. Mills <bcmills@google.com>
Thu, 8 Apr 2021 16:55:27 +0000 (16:55 +0000)
commit0e09e4143e3d55ac8cbcbf53f1da98b817fc5a58
treeebc82882110d4d54cca19f2f2fdd50e219c5a842
parent31d2556273795ae10709d3bc157ec5d3f0e070a2
cmd/go: assume Go 1.16 semantics uniformly for unversioned modules

However, still only trigger -mod=vendor automatically (and only apply
the more stringent Go 1.14 vendor consistency checks) if the 'go'
version is explicit. This provides maximal compatibility with Go 1.16
and earlier: Go 1.11 modules will continue not to fail vendor
consistency checks, but scripts that assume semantics up to Go 1.16
for unversioned modules will continue to work unmodified.

Fixes #44976
For #36460

Change-Id: Idb05ca320023f57249c71fc8079218e8991d1ff9
Reviewed-on: https://go-review.googlesource.com/c/go/+/308509
Trust: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/modfile.go
src/cmd/go/testdata/script/mod_go_version_missing.txt
src/cmd/go/testdata/script/mod_retention.txt