cmd/go: pass go language version to cmd/compile
Pass the Go language version specified in the go.mod file to cmd/compile. Also, 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: I46803813e7872d4a418a3fd5299880be3b73a971 Reviewed-on: https://go-review.googlesource.com/c/147278 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Showing
Please
register
or
sign in
to comment