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

Issue 6499102: code review 6499102: go/build: reject empty strings in Import (Closed)

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

Description

go/build: reject empty strings in Import Fixes issue 3889.

Patch Set 1 #

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

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

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

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

Total comments: 1

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

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

Total comments: 6

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M src/pkg/go/build/build.go View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/go/build/build_test.go View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 15
fss
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 7 months ago (2012-09-12 20:24:31 UTC) #1
adg
My intuition suggests that this should probably be a panic instead of an error return.
11 years, 7 months ago (2012-09-12 23:36:58 UTC) #2
fss
Hello rsc@golang.org, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 7 months ago (2012-09-13 00:30:20 UTC) #3
fss
On Wed, Sep 12, 2012 at 8:36 PM, Andrew Gerrand <adg@golang.org> wrote: > My intuition ...
11 years, 7 months ago (2012-09-13 00:30:57 UTC) #4
adg
http://codereview.appspot.com/6499102/diff/7002/src/pkg/go/build/build.go File src/pkg/go/build/build.go (right): http://codereview.appspot.com/6499102/diff/7002/src/pkg/go/build/build.go#newcode352 src/pkg/go/build/build.go:352: panic(`Can't import "".`) panic(`go/build: tried to Import invalid path ...
11 years, 7 months ago (2012-09-13 00:35:34 UTC) #5
adg
On 2012/09/13 00:35:34, adg wrote: > http://codereview.appspot.com/6499102/diff/7002/src/pkg/go/build/build.go > File src/pkg/go/build/build.go (right): > > http://codereview.appspot.com/6499102/diff/7002/src/pkg/go/build/build.go#newcode352 > ...
11 years, 7 months ago (2012-09-13 00:37:05 UTC) #6
rsc
On 2012/09/12 23:36:58, adg wrote: > My intuition suggests that this should probably be a ...
11 years, 7 months ago (2012-09-13 03:10:19 UTC) #7
adg
On 13 September 2012 13:10, <rsc@golang.org> wrote: > On 2012/09/12 23:36:58, adg wrote: >> >> ...
11 years, 7 months ago (2012-09-13 03:18:08 UTC) #8
fss
On 2012/09/13 03:18:08, adg wrote: > On 13 September 2012 13:10, <mailto:rsc@golang.org> wrote: > > ...
11 years, 7 months ago (2012-09-13 13:49:22 UTC) #9
fss
Hello rsc@golang.org, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 7 months ago (2012-09-13 13:49:53 UTC) #10
rsc
Looks good except for test nits. Thanks. http://codereview.appspot.com/6499102/diff/5003/src/pkg/go/build/build_test.go File src/pkg/go/build/build_test.go (right): http://codereview.appspot.com/6499102/diff/5003/src/pkg/go/build/build_test.go#newcode67 src/pkg/go/build/build_test.go:67: t.Fatal("Import should ...
11 years, 7 months ago (2012-09-13 14:05:51 UTC) #11
fss
Please take another look. https://codereview.appspot.com/6499102/diff/5003/src/pkg/go/build/build_test.go File src/pkg/go/build/build_test.go (right): https://codereview.appspot.com/6499102/diff/5003/src/pkg/go/build/build_test.go#newcode67 src/pkg/go/build/build_test.go:67: t.Fatal("Import should not accept empty ...
11 years, 7 months ago (2012-09-13 14:09:41 UTC) #12
rsc
>> Functions that return errors usually do that in preference to panicking. > > Do ...
11 years, 7 months ago (2012-09-13 14:22:57 UTC) #13
rsc
LGTM
11 years, 7 months ago (2012-09-13 14:24:28 UTC) #14
rsc
11 years, 7 months ago (2012-09-13 14:26:15 UTC) #15
*** Submitted as http://code.google.com/p/go/source/detail?r=77aaafa3b2e2 ***

go/build: reject empty strings in Import

Fixes issue 3889.

R=rsc, adg
CC=golang-dev
http://codereview.appspot.com/6499102

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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