So far this seems like a really neat concept and direction.
I think I personally would prefer (maybe as an option) that downloads, builds,
etc. end up in a specified directly, either system-wide or per-user.
http://codereview.appspot.com/224043/diff/13/1016
File src/cmd/goinstall/doc.go (right):
http://codereview.appspot.com/224043/diff/13/1016#newcode70
src/cmd/goinstall/doc.go:70: the import path and the list of Go files in the
package.
This presumably requires that the Makefile is a 'Go-like' Makefile, in so far as
they typically have the first line be:
include $(GOROOT)/src/Make.$(GOARCH)
My makefiles aren't based on this so I would have to make sure the behavior I
have here (targets and file-placement) is that same surely?
I personally would prefer things are built and installed into some file
hierarchy that is not inside GOROOT.
http://codereview.appspot.com/224043/diff/13/1017
File src/cmd/goinstall/download.go (right):
http://codereview.appspot.com/224043/diff/13/1017#newcode36
src/cmd/goinstall/download.go:36: var github =
regexp.MustCompile(`^(github\.com/[a-z0-9A-Z_.\-]+/[a-z0-9A-Z_.\-]+\.git)(/[a-z0-9A-Z_.\-/]*)?$`)
I assume the long term plan here is to have some table of patterns and
functions? Or if things could be sufficiently well abstracted out a table of
patterns and actions? (Which could even be runtime at that point)
http://codereview.appspot.com/224043/diff/13/1018
File src/cmd/goinstall/main.go (right):
http://codereview.appspot.com/224043/diff/13/1018#newcode55
src/cmd/goinstall/main.go:55: gobin = os.Getenv("HOME") + "/bin"
Is that always a safe guess? Might we want to check for the presence of gofmt
or something just to be certain?
http://codereview.appspot.com/224043/diff/13/1018#newcode193
src/cmd/goinstall/main.go:193: w, err := p.Wait(0)
Should there be some sort of timeout here? The command could hand indefinitely.
> http://codereview.appspot.com/224043/diff/13/1016#newcode70
> src/cmd/goinstall/doc.go:70: the import path and the list of Go files in
> the package.
> This presumably requires that the Makefile is a 'Go-like' Makefile, in
> so far as they typically have the first line be:
>
> include $(GOROOT)/src/Make.$(GOARCH)
>
> My makefiles aren't based on this so I would have to make sure the
> behavior I have here (targets and file-placement) is that same surely?
Your makefiles are ignored. As long as you have a directory
of Go files from a single non-main pages, they'll get compiled
and built correctly by goinstall.
> I personally would prefer things are built and installed into some file
> hierarchy that is not inside GOROOT.
I know. That will be next, but for now, $GOROOT is fine.
(See discussion on mailing list.)
> Is that always a safe guess? Might we want to check for the presence of
> gofmt or something just to be certain?
Good idea, thanks.
> Should there be some sort of timeout here? The command could hand
> indefinitely.
If it does, the user will surely get tired of waiting and interrupt it.
That seems reasonable.
Russ
adg /home/adg/godev$ goinstall github.com/hoisie/web.go
github.com/hoisie/web.go: unknown repository: github.com/hoisie/web.go
adg /home/adg/godev$ goinstall github.com/jacobsa/igo.git/set
github.com/jacobsa/igo.git/set: no such file or directory
What am I doing wrong here?
On 3 March 2010 13:36, Andrew Gerrand <adg@golang.org> wrote:
> LGTM
>
> Let's see how this goes ...
>
> On 3 March 2010 13:24, <rsc@golang.org> wrote:
>> Hello adg (cc: cw, golang-dev@googlegroups.com),
>>
>> I'd like you to review this change.
>>
>>
>> http://codereview.appspot.com/224043/show
>>
>
didn't look at the python http://codereview.appspot.com/224043/diff/17/1041 File src/cmd/goinstall/doc.go (right): http://codereview.appspot.com/224043/diff/17/1041#newcode9 src/cmd/goinstall/doc.go:9: control systems, and it ...
On Tue, Mar 2, 2010 at 20:00, Andrew Gerrand <adg@golang.org> wrote:
> adg /home/adg/godev$ goinstall github.com/hoisie/web.go
> github.com/hoisie/web.go: unknown repository: github.com/hoisie/web.go
this one you missed .git but i think i might take that out of the paths.
> adg /home/adg/godev$ goinstall github.com/jacobsa/igo.git/set
> github.com/jacobsa/igo.git/set: no such file or directory
>
don't know what's wrong on this one.
russ
On 3 March 2010 16:12, Russ Cox <rsc@golang.org> wrote:
> On Tue, Mar 2, 2010 at 20:00, Andrew Gerrand <adg@golang.org> wrote:
>>
>> adg /home/adg/godev$ goinstall github.com/hoisie/web.go
>> github.com/hoisie/web.go: unknown repository: github.com/hoisie/web.go
>
> this one you missed .git but i think i might take that out of the paths.
adg /home/adg/godev/web$ goinstall github.com/hoisie/web.go.git
github.com/hoisie/web.go.git: no such file or directory
Now I get the same error as the below. I'll investigate.
Andrew
LGTM http://codereview.appspot.com/224043/diff/17/1041 File src/cmd/goinstall/doc.go (right): http://codereview.appspot.com/224043/diff/17/1041#newcode76 src/cmd/goinstall/doc.go:76: did this text go anywhere? there are no ...
> did this text go anywhere? there are no new files.
> (it's fine if it didn't)
it didn't. it's already been posted to the mailing list once.
i might add it to the package dashboard web page later.
russ
On 4 March 2010 13:42, Russ Cox <rsc@golang.org> wrote:
> Have not investigated Andrew's problem.
I haven't had a chance to check this out yet. I'll have another look
now. I want to make sure that I can easily use (and explain) this tool
before we release it.
However, I've come across another issue in the meantime:
When you run GOROOT/src/all.bash it cleans out
$GOROOT/pkg/GOOS_GOARCH. This means any packages a user has installed
with goinstall will need to be rebuilt afterward. I suppose this makes
sense - as the compiler may have changed, necessitating a recompile.
Is there an easy way for me to recompile all of my 3rd party libs?
Andrew
> When you run GOROOT/src/all.bash it cleans out
> $GOROOT/pkg/GOOS_GOARCH. This means any packages a user has installed
> with goinstall will need to be rebuilt afterward. I suppose this makes
> sense - as the compiler may have changed, necessitating a recompile.
> Is there an easy way for me to recompile all of my 3rd party libs?
No but it's easy to recompile the program you
care about, which will automatically recompile
all the 3rd party libs it needs.
Russ
> adg /home/adg/godev/web$ goinstall github.com/hoisie/web.go.git
> github.com/hoisie/web.go.git: no such file or directory
I cannot reproduce this.
I have tried on Linux and Mac.
Is it possible you have a stale copy of the code?
I assume you did a clpatch.
hg revert @224043
hg change -D 224043
rm -r $GOROOT/src/cmd/goinstall $GOROOT/misc/dashboard/godashboard/package.py
hg clpatch 224043
cd $GOROOT/src/cmd/goinstall
make clean
make install
Russ
LGTM
It seems to be working well now.
On 5 March 2010 11:29, Russ Cox <rsc@golang.org> wrote:
>> adg /home/adg/godev/web$ goinstall github.com/hoisie/web.go.git
>> github.com/hoisie/web.go.git: no such file or directory
>
> I cannot reproduce this.
> I have tried on Linux and Mac.
> Is it possible you have a stale copy of the code?
> I assume you did a clpatch.
>
> hg revert @224043
> hg change -D 224043
> rm -r $GOROOT/src/cmd/goinstall $GOROOT/misc/dashboard/godashboard/package.py
> hg clpatch 224043
> cd $GOROOT/src/cmd/goinstall
> make clean
> make install
>
> Russ
>
*** Submitted as http://code.google.com/p/go/source/detail?r=8ef8f7073d10 *** goinstall: an experiment in (external) package installation R=adg, r CC=cw, ...
Issue 224043: code review 224043: goinstall: an experiment in (external) package installation
(Closed)
Created 15 years ago by rsc
Modified 15 years ago
Reviewers:
Base URL:
Comments: 33