Re: code review 6941058: cmd/go: remove $GOROOT as a go get target (issue 6941058)

227 views
Skip to first unread message

da...@cheney.net

unread,
Jan 8, 2013, 6:31:36 PM1/8/13
to r...@golang.org, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

da...@cheney.net

unread,
Jan 8, 2013, 6:35:02 PM1/8/13
to r...@golang.org, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
On 2013/01/08 23:31:36, dfc wrote:
> Hello mailto:r...@golang.org, mailto:a...@golang.org (cc:
mailto:golan...@googlegroups.com),

> Please take another look.

With two exceptions the new builder code has been rolled out.

@rsc, can I ask for some of your time to review this CL acknowledging
that I would not submit until the remaining builders have been updated.

https://codereview.appspot.com/6941058/

r...@golang.org

unread,
Jan 9, 2013, 3:58:10 PM1/9/13
to da...@cheney.net, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
I will leave the code review to adg. The new behavior is fine with me.
I'm a little sad that we can't have nice things but I understand the
reason.


https://codereview.appspot.com/6941058/

minux

unread,
Jan 9, 2013, 4:14:41 PM1/9/13
to da...@cheney.net, r...@golang.org, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

On Thu, Jan 10, 2013 at 4:58 AM, <r...@golang.org> wrote:
I will leave the code review to adg. The new behavior is fine with me.
I'm a little sad that we can't have nice things but I understand the
reason.
Out of curiosity, what do you mean by saying "we can't have nice things"?

Russ Cox

unread,
Jan 9, 2013, 4:55:23 PM1/9/13
to minux, Dave Cheney, Andrew Gerrand, golang-dev, re...@codereview-hr.appspotmail.com
>> I will leave the code review to adg. The new behavior is fine with me.
>> I'm a little sad that we can't have nice things but I understand the
>> reason.
>
> Out of curiosity, what do you mean by saying "we can't have nice things"?

I am not sure where the phrase comes from. Typically it is like "This
is why we can't have nice things", said after someone has broken
something, actually or metaphorically. The internet is failing me for
finding a page explaining it better.

In this case, I meant that I regret that we cannot provide the ability
to install into GOROOT. We are being forced to take it out because it
confuses users, even though it helps (some) core developers. It's not
a big deal. I agree with taking it out, I'm just a little sad to see
it go.

Russ

Andrew Gerrand

unread,
Jan 9, 2013, 5:04:37 PM1/9/13
to Russ Cox, minux, Dave Cheney, golang-dev, re...@codereview-hr.appspotmail.com

On 10 January 2013 08:55, Russ Cox <r...@golang.org> wrote:
I am not sure where the phrase comes from. Typically it is like "This
is why we can't have nice things", said after someone has broken
something, actually or metaphorically. The internet is failing me for
finding a page explaining it better.

a...@golang.org

unread,
Jan 9, 2013, 5:05:15 PM1/9/13
to da...@cheney.net, r...@golang.org, minu...@gmail.com, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

Dave Cheney

unread,
Jan 9, 2013, 5:08:26 PM1/9/13
to da...@cheney.net, r...@golang.org, a...@golang.org, minu...@gmail.com, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Thank you. Please accept my apologies for making the go tool a little
less awesome.

On Thu, Jan 10, 2013 at 9:05 AM, <a...@golang.org> wrote:
> LGTM
>
> https://codereview.appspot.com/6941058/

da...@cheney.net

unread,
Jan 9, 2013, 5:57:23 PM1/9/13
to da...@cheney.net, r...@golang.org, a...@golang.org, minu...@gmail.com, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
*** Submitted as
https://code.google.com/p/go/source/detail?r=adf4e96e9aa4 ***

cmd/go: remove $GOROOT as a go get target

Fixes issue 4186.

Back in the day, before the Go 1.0 release, $GOROOT was mandatory for
building from source. Fast forward to now and $GOPATH is mandatory and
$GOROOT is optional, and mainly used by those who use the binary
distribution in uncommon places.

For example, most novices at least know about `sudo` as they would have
used it to install the binary tarball into /usr/local. It is logical
they would use the `sudo` hammer to `go get` other Go packages when
faced with a permission error talking about the path they just had to
use `sudo` on last time.

Even if they had read the documentation and set $GOPATH, go get will not
work as expected as `sudo` masks most environment variables.

llucky(~) % ~/go/bin/go env | grep GOPATH
GOPATH="/home/dfc"
lucky(~) % sudo ~/go/bin/go env | grep GOPATH
GOPATH=""

This CL therefore proposes to remove support for using `go get` to
download source into $GOROOT.

This CL also proposes an error when GOPATH=$GOROOT, as this is another
place where new Go users can get stuck.

Further discussion:
https://groups.google.com/d/topic/golang-nuts/VIg3fjHiHRI/discussion

R=rsc, adg, minux.ma
CC=golang-dev
https://codereview.appspot.com/6941058


https://codereview.appspot.com/6941058/
Reply all
Reply to author
Forward
0 new messages