http://codereview.appspot.com/4515180/diff/7001/src/cmd/goinstall/main.go File src/cmd/goinstall/main.go (right): http://codereview.appspot.com/4515180/diff/7001/src/cmd/goinstall/main.go#newcode12 src/cmd/goinstall/main.go:12: gomake "go/make" Ugh. I missed that the package was ...
13 years, 10 months ago
(2011-06-03 18:43:04 UTC)
#3
> Ugh. I missed that the package was called make. > What about go/build ? ...
13 years, 10 months ago
(2011-06-03 19:02:08 UTC)
#4
> Ugh. I missed that the package was called make.
> What about go/build ?
If the intention is to have this being the merger of goinstall and make, can we
call it go<something> so that it can fit in /usr/bin properly?
> If the intention is to have this being the merger of goinstall and make, ...
13 years, 10 months ago
(2011-06-03 19:04:23 UTC)
#5
> If the intention is to have this being the merger of goinstall and make,
> can we call it go<something> so that it can fit in /usr/bin properly?
That's not the intention. There will be a separate gomake command.
This is a core package that it will use.
Russ
This is ready for review, now. On 2011/06/03 18:43:04, rsc wrote: > src/cmd/goinstall/main.go:12: gomake "go/make" ...
13 years, 9 months ago
(2011-06-07 00:24:14 UTC)
#7
This is ready for review, now.
On 2011/06/03 18:43:04, rsc wrote:
> src/cmd/goinstall/main.go:12: gomake "go/make"
> Ugh. I missed that the package was called make.
> What about go/build ?
Did that.
On 7 June 2011 11:11, <n13m3y3r@gmail.com> wrote: > http://codereview.appspot.com/4515180/diff/13001/src/cmd/goinstall/make.go#newcode36 > src/cmd/goinstall/make.go:36: if err = c.Clean(dir); ...
13 years, 9 months ago
(2011-06-07 01:18:03 UTC)
#9
On 7 June 2011 11:11, <n13m3y3r@gmail.com> wrote:
>
http://codereview.appspot.com/4515180/diff/13001/src/cmd/goinstall/make.go#ne...
> src/cmd/goinstall/make.go:36: if err = c.Clean(dir); err != nil {
> I'm not entirely sure this makes sense. Cleaning on make is important
> because it's dependency-based and will figure what actions it has to
> perform for bringing the tree up-to-date. Given the logic here, doesn't
> it mean we're overwriting the files anyway at all times, and thus
> cleaning before a build is a NOOP?
Yes. What's missing from this CL is incremental building, and I don't
think this CL should go in until that's ready. (My fault for
forgetting.) With that working, -clean would become meaningful again.
The strategy I intend to employ is to rebuild if input file mtime is >
output file mtime. Should it be any cleverer than that?
Andrew
> Yes. What's missing from this CL is incremental building, and I don't > think ...
13 years, 9 months ago
(2011-06-07 01:30:09 UTC)
#10
> Yes. What's missing from this CL is incremental building, and I don't
> think this CL should go in until that's ready. (My fault for
> forgetting.) With that working, -clean would become meaningful again.
I see.
> The strategy I intend to employ is to rebuild if input file mtime is >
> output file mtime. Should it be any cleverer than that?
That's what make does, so it should be a safe first step. It may
get a bit fancier in the future, and check the mtime of the direct
package dependencies too. This would likely avoid most of the
current uses of -clean too.
> > That's what make does, so it should be a safe first step. It ...
13 years, 9 months ago
(2011-06-07 01:37:40 UTC)
#11
>
> That's what make does, so it should be a safe first step. It may
> get a bit fancier in the future, and check the mtime of the direct
> package dependencies too. This would likely avoid most of the
> current uses of -clean too.
As long as you're making these decisions on the fly (e.g. you try to make a
target before you examine its mtime), it works out. The only other thing
that I would think to do initially (and you may have already thought of
this) is including the standard libraries as dependencies whose mtimes
should be examined. It's always nice when the builder notices that you
recompiled Go or made a stdlib edit without you having to tell it.
On 7 June 2011 11:30, <n13m3y3r@gmail.com> wrote: >> The strategy I intend to employ is ...
13 years, 9 months ago
(2011-06-07 06:33:48 UTC)
#12
On 7 June 2011 11:30, <n13m3y3r@gmail.com> wrote:
>> The strategy I intend to employ is to rebuild if input file mtime is >
>> output file mtime. Should it be any cleverer than that?
>
> That's what make does, so it should be a safe first step.
Done. PTAL
> It may
> get a bit fancier in the future, and check the mtime of the direct
> package dependencies too. This would likely avoid most of the
> current uses of -clean too.
That's the idea. It should also check package object versions and
re-build when deps are out-of-date.
Andrew
LGTM http://codereview.appspot.com/4515180/diff/35001/src/cmd/goinstall/main.go File src/cmd/goinstall/main.go (right): http://codereview.appspot.com/4515180/diff/35001/src/cmd/goinstall/main.go#newcode211 src/cmd/goinstall/main.go:211: if !errors { All this nesting was to ...
13 years, 9 months ago
(2011-06-14 17:31:55 UTC)
#17
On 15 June 2011 13:28, <adg@golang.org> wrote: > It only happens once. If I do ...
13 years, 9 months ago
(2011-06-15 04:30:04 UTC)
#19
On 15 June 2011 13:28, <adg@golang.org> wrote:
> It only happens once. If I do it again at some later stage, I'll add a
> method. Same for Output.
This comment is out of date. I made it a method.
Issue 4515180: code review 4515180: goinstall: use go/make package to scan and build packages
(Closed)
Created 13 years, 10 months ago by adg
Modified 13 years, 9 months ago
Reviewers:
Base URL:
Comments: 32