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

Issue 155050043: code review 155050043: go/build: Return MultiplePackageError on importing a di... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 6 months ago by jfrederich
Modified:
9 years, 6 months ago
Reviewers:
gobot, adg, rsc
CC:
bradfitz, rsc, adg, golang-codereviews
Visibility:
Public.

Description

go/build: Return MultiplePackageError on importing a dir containing multiple packages When the Import function in go/build encounters a directory without any buildable Go source files, it returns a handy NoGoError. Now if, instead it encounters multiple Go source files from multiple packages, it returns a handy MultiplePackageError. A new test for NoGoError and MultiplePackageError is also provided. Fixes issue 8286.

Patch Set 1 #

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

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

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

Total comments: 5

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

Total comments: 1

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -0 lines) Patch
M src/go/build/build.go View 1 2 3 4 5 6 2 chunks +14 lines, -1 line 0 comments Download
M src/go/build/build_test.go View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A src/go/build/testdata/empty/dummy View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A src/go/build/testdata/multi/file.go View 1 1 chunk +5 lines, -0 lines 0 comments Download
A src/go/build/testdata/multi/file_appengine.go View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 16
jfrederich
Hello bradfitz@golang.org, rsc@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
9 years, 6 months ago (2014-10-07 15:54:46 UTC) #1
rsc
please use // MultiplePackageError describes a directory containing // buildable Go source files for multiple ...
9 years, 6 months ago (2014-10-07 16:19:00 UTC) #2
jfrederich
On 2014/10/07 16:19:00, rsc wrote: > please use > > // MultiplePackageError describes a directory ...
9 years, 6 months ago (2014-10-07 16:22:51 UTC) #3
jfrederich
Hello bradfitz@golang.org, rsc@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 6 months ago (2014-10-08 07:18:39 UTC) #4
adg
Please rename the file ".empty" to "dummy" (no leading dot). The Go tool doesn't care ...
9 years, 6 months ago (2014-10-08 15:10:18 UTC) #5
jfrederich
On 2014/10/08 15:10:18, adg wrote: > Please rename the file ".empty" to "dummy" (no leading ...
9 years, 6 months ago (2014-10-08 19:58:30 UTC) #6
jfrederich
Hello bradfitz@golang.org, rsc@golang.org, adg@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 6 months ago (2014-10-08 20:01:29 UTC) #7
adg
The empty directory seems to have disappeared? https://codereview.appspot.com/155050043/diff/80001/src/go/build/build.go File src/go/build/build.go (right): https://codereview.appspot.com/155050043/diff/80001/src/go/build/build.go#newcode425 src/go/build/build.go:425: Files []string ...
9 years, 6 months ago (2014-10-09 07:48:23 UTC) #8
jfrederich
On 2014/10/09 07:48:23, adg wrote: > The empty directory seems to have disappeared? > Sorry, ...
9 years, 6 months ago (2014-10-09 08:17:15 UTC) #9
jfrederich
Hello bradfitz@golang.org, rsc@golang.org, adg@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 6 months ago (2014-10-09 08:17:36 UTC) #10
adg
LGTM But Russ should approve/submit. Thanks.
9 years, 6 months ago (2014-10-09 08:44:54 UTC) #11
jfrederich
Fine, I'll move on to next issue. Jens On Thu, Oct 9, 2014 at 10:44 ...
9 years, 6 months ago (2014-10-09 09:16:25 UTC) #12
jfrederich
> > But Russ should approve/submit. Thanks. > > > > https://codereview.appspot.com/155050043/ Russ, is it ...
9 years, 6 months ago (2014-10-14 15:11:53 UTC) #13
rsc
LGTM
9 years, 6 months ago (2014-10-15 03:08:40 UTC) #14
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=60a10bf059e7 *** go/build: Return MultiplePackageError on importing a dir containing multiple packages ...
9 years, 6 months ago (2014-10-15 03:25:03 UTC) #15
gobot
9 years, 6 months ago (2014-10-15 03:37:36 UTC) #16
This CL appears to have broken the windows-386 builder.
See http://build.golang.org/log/77a6724c0757e19224d8a13ae85d859c807d314f
Sign in to reply to this message.

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