]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.11] cmd/go: don't fail if requested Go version is later than...
authorIan Lance Taylor <iant@golang.org>
Tue, 27 Nov 2018 23:40:39 +0000 (15:40 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 3 Dec 2018 05:00:14 +0000 (05:00 +0000)
commit9cc0209ef1393ae472aed93335c6915cf3269f21
tree49a3eed886670c05ff0ab7446519ca222a754bb9
parent6fa0ace1288bce4eeb5228caeb7050c11e232858
[release-branch.go1.11] cmd/go: don't fail if requested Go version is later than current one

This is a partial backport of CL 147278 from tip to the Go 1.11 branch.

Change the behavior when the go.mod file requests a Go version that is
later than the current one. Previously cmd/go would give a fatal error
in this situation. With this change it attempts the compilation, and
if (and only if) the compilation fails it adds a note saying that the
requested Go version is newer than the known version.  This is as
described in https://golang.org/issue/28221.

Updates #28221

Change-Id: Iea03ca574b6b1a046655f2bb2e554126f877fb66
Reviewed-on: https://go-review.googlesource.com/c/151358
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/work/exec.go
src/cmd/go/testdata/script/mod_go_version.txt