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

Issue 5553059: code review 5553059: cmd/go: implement go get + bug fixes (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by rsc
Modified:
13 years, 5 months ago
Reviewers:
tux21b
CC:
r, adg, golang-dev
Visibility:
Public.

Description

cmd/go: implement go get + bug fixes Move error information into Package struct, so that a package can be returned even if a dependency failed to load or did not exist. This makes it possible to run 'go fix' or 'go fmt' on packages with broken dependencies or missing imports. It also enables go get -fix. The new go list -e flag lets go list process those package errors as normal data. Change p.Doc to be first sentence of package doc, not entire package doc. Makes go list -json or go list -f '{{.ImportPath}} {{.Doc}}' much more reasonable. The go tool now depends on http, which means also net and crypto/tls, both of which use cgo. Trying to make the build scripts that build the go tool understand and handle cgo is too much work. Instead, we build a stripped down version of the go tool, compiled as go_bootstrap, that substitutes an error stub for the usual HTTP code. The buildscript builds go_bootstrap, go_bootstrap builds the standard packages and commands, including the full including-HTTP-support go tool, and then go_bootstrap gets deleted. Also handle the case where the buildscript needs updating during all.bash: if it fails but a go command can be found on the current $PATH, try to regenerate it. This gracefully handles situations like adding a new file to a package used by the go tool.

Patch Set 1 #

Patch Set 2 : diff -r ca746701db5c https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 96a40289f91a https://go.googlecode.com/hg/ #

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

Patch Set 5 : diff -r 06129c716fbb https://code.google.com/p/go/ #

Patch Set 6 : diff -r 06129c716fbb https://code.google.com/p/go/ #

Patch Set 7 : diff -r 06129c716fbb https://code.google.com/p/go/ #

Total comments: 16

Patch Set 8 : diff -r bc07ad621734 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 9 : diff -r 0b94f1e20038 https://go.googlecode.com/hg/ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1309 lines, -479 lines) Patch
M src/buildscript.sh View 1 2 3 4 1 chunk +5 lines, -4 lines 0 comments Download
M src/buildscript/darwin_386.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/darwin_amd64.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/freebsd_386.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/freebsd_amd64.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/linux_386.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/linux_amd64.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/linux_arm.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/netbsd_386.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/netbsd_amd64.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/openbsd_386.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/openbsd_amd64.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/plan9_386.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/windows_386.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/buildscript/windows_amd64.sh View 1 2 3 4 5 6 7 8 5 chunks +23 lines, -23 lines 0 comments Download
M src/cmd/go/Makefile View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M src/cmd/go/build.go View 1 2 3 4 5 6 7 10 chunks +39 lines, -15 lines 0 comments Download
M src/cmd/go/get.go View 1 2 3 4 5 6 7 2 chunks +242 lines, -12 lines 0 comments Download
M src/cmd/go/list.go View 1 2 3 4 5 6 7 4 chunks +27 lines, -6 lines 0 comments Download
M src/cmd/go/main.go View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
M src/cmd/go/pkg.go View 1 2 3 4 5 6 7 10 chunks +227 lines, -69 lines 0 comments Download
M src/cmd/go/run.go View 1 2 3 3 chunks +8 lines, -22 lines 0 comments Download
M src/cmd/go/test.go View 1 2 3 4 5 chunks +15 lines, -23 lines 0 comments Download
A src/cmd/go/vcs.go View 1 2 3 4 1 chunk +404 lines, -0 lines 1 comment Download
M src/make.bash View 1 2 3 4 5 6 7 1 chunk +13 lines, -3 lines 0 comments Download

Messages

Total messages: 8
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
13 years, 6 months ago (2012-01-21 06:13:01 UTC) #1
r
i didn't look at vcs or get http://codereview.appspot.com/5553059/diff/7033/src/cmd/go/list.go File src/cmd/go/list.go (right): http://codereview.appspot.com/5553059/diff/7033/src/cmd/go/list.go#newcode52 src/cmd/go/list.go:52: Incomplete bool ...
13 years, 5 months ago (2012-01-21 22:40:50 UTC) #2
adg
LGTM Looking forward to the tests. http://codereview.appspot.com/5553059/diff/7033/src/cmd/go/get.go File src/cmd/go/get.go (right): http://codereview.appspot.com/5553059/diff/7033/src/cmd/go/get.go#newcode26 src/cmd/go/get.go:26: The -a, -n, ...
13 years, 5 months ago (2012-01-23 02:26:42 UTC) #3
rsc
Hello golang-dev@googlegroups.com, r@golang.org, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 5 months ago (2012-01-23 17:31:58 UTC) #4
rsc
http://codereview.appspot.com/5553059/diff/7033/src/cmd/go/get.go File src/cmd/go/get.go (right): http://codereview.appspot.com/5553059/diff/7033/src/cmd/go/get.go#newcode26 src/cmd/go/get.go:26: The -a, -n, -v, -x, and -p flags have ...
13 years, 5 months ago (2012-01-23 17:32:14 UTC) #5
r
LGTM or rather LGEFN (looks good enough for now) http://codereview.appspot.com/5553059/diff/13001/src/cmd/go/pkg.go File src/cmd/go/pkg.go (right): http://codereview.appspot.com/5553059/diff/13001/src/cmd/go/pkg.go#newcode225 src/cmd/go/pkg.go:225: ...
13 years, 5 months ago (2012-01-23 18:34:29 UTC) #6
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=718dab80dcda *** cmd/go: implement go get + bug fixes Move error information ...
13 years, 5 months ago (2012-01-23 20:16:54 UTC) #7
tux21b
13 years, 5 months ago (2012-01-23 20:47:03 UTC) #8
http://codereview.appspot.com/5553059/diff/11002/src/cmd/go/vcs.go
File src/cmd/go/vcs.go (right):

http://codereview.appspot.com/5553059/diff/11002/src/cmd/go/vcs.go#newcode290
src/cmd/go/vcs.go:290: check:  noVCSSuffix,
I think there is a vcs: "git" entry missing. At least I am unable to fetch any
github repos at the moment.
Sign in to reply to this message.

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