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

Issue 6899057: code review 6899057: go/build: give better explanation for "cannot find package" (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by dave
Modified:
11 years, 4 months ago
Reviewers:
CC:
golang-dev, rsc
Visibility:
Public.

Description

go/build: give better explanation for "cannot find package" Fixes issue 4079. Some example output: % go install foo/bar can't load package: package foo/bar: cannot find package "foo/bar" in any of: /home/dfc/go/src/pkg/foo/bar (from $GOROOT) /home/dfc/src/foo/bar (from $GOPATH) /home/dfc/src2/src/foo/bar % GOPATH= go install foo/bar can't load package: package foo/bar: cannot find package "foo/bar" in any of: /home/dfc/go/src/pkg/foo/bar (from $GOROOT) ($GOPATH not set)

Patch Set 1 #

Patch Set 2 : code review 6899057: go/build: give better explanation for "cannot find package" #

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

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

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

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

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

Patch Set 8 : diff -r ec3ae5b98922 https://code.google.com/p/go #

Patch Set 9 : diff -r ec3ae5b98922 https://code.google.com/p/go #

Total comments: 2

Patch Set 10 : diff -r ec3ae5b98922 https://code.google.com/p/go #

Patch Set 11 : diff -r 3b81a777b3a1 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -1 line) Patch
M src/cmd/go/test.bash View 1 2 3 4 5 6 7 8 9 1 chunk +31 lines, -0 lines 0 comments Download
M src/pkg/go/build/build.go View 1 2 3 4 5 6 7 8 9 3 chunks +29 lines, -1 line 0 comments Download

Messages

Total messages: 5
dave_cheney.net
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 4 months ago (2012-12-10 10:20:25 UTC) #1
rsc
LGTM Please look into adding a test to test.bash.
11 years, 4 months ago (2012-12-11 18:35:34 UTC) #2
dave_cheney.net
On 2012/12/11 18:35:34, rsc wrote: > LGTM > > Please look into adding a test ...
11 years, 4 months ago (2012-12-12 00:55:10 UTC) #3
rsc
LGTM Please use egrep instead of grep -E in the script, for maximum portability. https://codereview.appspot.com/6899057/diff/20002/src/pkg/go/build/build.go ...
11 years, 4 months ago (2012-12-12 04:10:24 UTC) #4
dave_cheney.net
11 years, 4 months ago (2012-12-12 10:39:07 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=afac768ad2fe ***

go/build: give better explanation for "cannot find package"

Fixes issue 4079.

Some example output:

% go install foo/bar
can't load package: package foo/bar: cannot find package "foo/bar" in any of:
        /home/dfc/go/src/pkg/foo/bar (from $GOROOT)
        /home/dfc/src/foo/bar (from $GOPATH)
        /home/dfc/src2/src/foo/bar

% GOPATH= go install foo/bar
can't load package: package foo/bar: cannot find package "foo/bar" in any of:
	/home/dfc/go/src/pkg/foo/bar (from $GOROOT)
	($GOPATH not set)

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/6899057

https://codereview.appspot.com/6899057/diff/20002/src/pkg/go/build/build.go
File src/pkg/go/build/build.go (right):

https://codereview.appspot.com/6899057/diff/20002/src/pkg/go/build/build.go#n...
src/pkg/go/build/build.go:429: var tried = struct {
On 2012/12/12 04:10:24, rsc wrote:
> s/ =//
> and then s/{}// below

Done.
Sign in to reply to this message.

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