]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] cmd/go: error out of 'go mod tidy' if the go version is newer...
authorBryan C. Mills <bcmills@google.com>
Thu, 13 May 2021 13:48:40 +0000 (09:48 -0400)
committerCarlos Amedee <carlos@golang.org>
Wed, 2 Jun 2021 19:00:32 +0000 (19:00 +0000)
commitf2222d8284fec442da68c6b09f0dabad97ec17c3
tree60100162287bbc73f5ac0e5c2c034c24ab9de205
parentc9f27b8d31291cc1051824c108452c2e05c0b79d
[release-branch.go1.16] cmd/go: error out of 'go mod tidy' if the go version is newer than supported

This backports the test from CL 319669, but — because of extensive
changes to the module loader during the Go 1.17 cycle — the
implementation is entirely different. (This implementation is based on
the addGoStmt function present in init.go in the 1.16 branch.)

Fixes #46144
Updates #46142

Change-Id: Ib7a0a159e53cbe476be6aa9a050add10cc750dec
Reviewed-on: https://go-review.googlesource.com/c/go/+/319671
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modcmd/tidy.go
src/cmd/go/internal/modload/buildlist.go
src/cmd/go/testdata/script/mod_tidy_too_new.txt [new file with mode: 0644]