Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: pass expected version to compiler #19064

Closed
rsc opened this issue Feb 13, 2017 · 1 comment
Closed

cmd/go: pass expected version to compiler #19064

rsc opened this issue Feb 13, 2017 · 1 comment
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Feb 13, 2017

Split off from discussion #18678, there referred to as "2".

Plan is to add a new internal-use flag to the compiler, -needversion,
and the compiler dies with a useful error if its own runtime.Version
does not match the passed in flag. When invoking the compiler,
the go command would pass -needversion with its own runtime.Version.
The check would then detect when the go command and the compiler
disagree about the Go toolchain version, which happens (to sometimes
mysterious effect) when the first 'go' in $PATH does not match the
$GOROOT environment setting.

@gopherbot
Copy link

CL https://golang.org/cl/42595 mentions this issue.

gopherbot pushed a commit that referenced this issue Jun 14, 2017
The check that the go tool version matched the go compiler version was
too aggressive and didn't cover the bootstrapping case with make.bash.

We never noticed because we never had a VERSION file in place.

Repro:

$ echo "go1.9beta1" > $GOROOT/VERSION
$ cd $GOROOT/src
$ ./make.bash

No test, because x/build/cmd/release catches it.

Updates #19064
Fixes #20674

Change-Id: Ibdd7a92377f4cc77d71ed548f02d48bde6550f67
Reviewed-on: https://go-review.googlesource.com/45778
Reviewed-by: Chris Broadfoot <cbro@golang.org>
@golang golang locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants