-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
make.bash: make default GOROOT_BOOTSTRAP more useful #14339
Comments
Changing the default GOROOT_BOOTSTRAP to $(go env GOROOT)
will break users of go tip.
|
On Mon, Feb 15, 2016 at 8:57 PM, Minux Ma notifications@github.com wrote:
But using $HOME/go1.4 will force everyone to explicitly set |
I don't think it's unreasonable to rebuild Go with make.bash
with the current $GOROOT/bin in $PATH. It's not necessarily
specific to Go tip users.
|
I strongly disagree about using the current PATH's 'go', because many times that will be the Go distribution being rebuilt at that moment, and you'll get into weird circularity problems. However, if you can filter out the current directory's go command, for example with appropriate processing of "which -a go", then using the next go in the path might be reasonable. That seems fine if someone wants to write the CL (and it's simple!), but it's not a release blocker. |
Change https://golang.org/cl/57753 mentions this issue: |
There are currently two problems with default
GOROOT_BOOTSTRAP
handling in themake.bash
script.The first problem is that the default value set in
make.bash
($HOME/go1.4
) will not be used by thego dist
tool, since the newGOROOT_BOOSTRAP
environment variable is not exported. The code works only because thego dist
tool uses the same default value.The second problem is that
$HOME/go1.4
will be an invalidGOROOT
for the majority of users, thus forcing the user to explicitly set theGOROOT_BOOSTRAP
environment variable.I propose to change the default
GOROOT_BOOTSTRAP
value to the value returned bygo env GOROOT
, where thego
command inPATH
is used. TheGOROOT_BOOSTRAP
should be exported. As an example:The text was updated successfully, but these errors were encountered: