Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10852)

Issue 151730045: code review 151730045: cmd/go: make build -a skip standard packages in Go releases (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 6 months ago by rsc
Modified:
9 years, 4 months ago
Reviewers:
r, gobot, tianon, minux, costinc
CC:
golang-codereviews, r, btracey, adg, iant
Visibility:
Public.

Description

cmd/go: make build -a skip standard packages in Go releases Today, 'go build -a my/pkg' and 'go install -a my/pkg' recompile not just my/pkg and all its dependencies that you wrote but also the standard library packages. Recompiling the standard library is problematic on some systems because the installed copy is not writable. The -a behavior means that you can't use 'go install -a all' or 'go install -a my/...' to rebuild everything after a Go release - the rebuild stops early when it cannot overwrite the installed standard library. During development work, however, you do want install -a to rebuild everything, because anything might have changed. Resolve the conflict by making the behavior of -a depend on whether we are using a released copy of Go or a devel copy. In the release copies, -a no longer applies to the standard library. In the devel copies, it still does. This is the latest in a long line of refinements to the "do I build this or not" logic. It is surely not the last. Fixes issue 8290.

Patch Set 1 #

Patch Set 2 : diff -r 49fd34ea89660e182272c8798bb10ee831668763 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 49fd34ea89660e182272c8798bb10ee831668763 https://code.google.com/p/go/ #

Patch Set 4 : diff -r a7921c02a8ab6be1c35a9acb3c87308c21377346 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -2 lines) Patch
M src/cmd/go/build.go View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/go/doc.go View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/go/pkg.go View 1 2 3 chunks +17 lines, -1 line 0 comments Download
M src/cmd/go/test.bash View 1 2 chunks +27 lines, -1 line 0 comments Download
A src/cmd/go/testgo.go View 1 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 13
rsc
Hello golang-codereviews@googlegroups.com (cc: adg, iant, r), I'd like you to review this change to https://code.google.com/p/go/
9 years, 6 months ago (2014-09-26 18:19:47 UTC) #1
r
LGTM to me, which is to say, "bleah".
9 years, 6 months ago (2014-09-26 18:30:27 UTC) #2
btracey
This also fixes issue 6424 On Friday, September 26, 2014 11:19:48 AM UTC-7, russ cox ...
9 years, 6 months ago (2014-09-26 18:31:30 UTC) #3
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=6364b071649c *** cmd/go: make build -a skip standard packages in Go releases ...
9 years, 6 months ago (2014-09-26 18:41:32 UTC) #4
minux
this seems too magic to me. consider what if we ask a issue reporter to ...
9 years, 6 months ago (2014-09-27 03:36:58 UTC) #5
gobot
This changed caused perf changes on linux-amd64-perf: build-1 old new delta build-cputime 10040626000 1636101000 -83.71 ...
9 years, 6 months ago (2014-09-29 12:50:01 UTC) #6
rsc
On Fri, Sep 26, 2014 at 11:36 PM, minux <minux@golang.org> wrote: > this seems too ...
9 years, 6 months ago (2014-09-29 13:43:33 UTC) #7
minux
On Sep 29, 2014 9:43 AM, "Russ Cox" <rsc@golang.org> wrote: > > On Fri, Sep ...
9 years, 6 months ago (2014-09-29 20:40:09 UTC) #8
costinc
Won't this affect cross compiling? Until now I've used "go install -a" to rebuild std ...
9 years, 6 months ago (2014-09-30 10:39:52 UTC) #9
tianon
On 2014/09/26 18:41:32, rsc wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=6364b071649c *** > > cmd/go: make ...
9 years, 4 months ago (2014-12-02 09:27:00 UTC) #10
minux
On Tue, Dec 2, 2014 at 4:27 AM, <admwiggin@gmail.com> wrote: > > This breaks the ...
9 years, 4 months ago (2014-12-02 10:10:17 UTC) #11
tianon
On 2 December 2014 at 03:09, minux <minux@golang.org> wrote: > Have you tried the following ...
9 years, 4 months ago (2014-12-02 16:31:52 UTC) #12
minux
9 years, 4 months ago (2014-12-02 23:00:25 UTC) #13
On Tue, Dec 2, 2014 at 11:31 AM, Tianon Gravi <admwiggin@gmail.com> wrote:

> On 2 December 2014 at 03:09, minux <minux@golang.org> wrote:
> > Have you tried the following 2-step process?
> > go install -a -tags netgo net # just reinstall net
> > go install -v std # no -a
>
> Gave that a shot, and still no dice.  I added "-v" to the first
> command so that I could see what packages it actually compiles, and I
> don't get any output from either command on 1.4rc2 (and I still get
> the same error with linking in net).
>
OK. Leave for rsc.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b