]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: undo CL 7129048
authorRuss Cox <rsc@golang.org>
Mon, 28 Jan 2013 17:49:26 +0000 (12:49 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 28 Jan 2013 17:49:26 +0000 (12:49 -0500)
This broke 'godoc net/http'.

TBR=adg
CC=golang-dev
https://golang.org/cl/7235052

src/pkg/go/build/build.go
src/pkg/go/build/build_test.go

index 6c65b3da635d7689f751f6b578ad1f7f3f12a232..f11582ac685584b4bdeccaaf047670b98b3737c8 100644 (file)
@@ -322,7 +322,9 @@ func (p *Package) IsCommand() bool {
 // the named directory.
 func (ctxt *Context) ImportDir(dir string, mode ImportMode) (*Package, error) {
        p, err := ctxt.Import(".", dir, mode)
-       if err == nil && !ctxt.isDir(p.Dir) {
+       // TODO(rsc,adg): breaks godoc net/http. Not sure why.
+       // See CL 7232047 and issue 4696.
+       if false && err == nil && !ctxt.isDir(p.Dir) {
                err = fmt.Errorf("%q is not a directory", p.Dir)
        }
        return p, err
index 56e2786b8ff183c318f5e3aee8b8a09c7217630a..4684d9baf804eb0d45312389f01aee218e48d588 100644 (file)
@@ -92,6 +92,7 @@ func TestLocalDirectory(t *testing.T) {
 
 // golang.org/issue/3248
 func TestBogusDirectory(t *testing.T) {
+       return // See issue 4696.
        const dir = "/foo/bar/baz/gopher"
        _, err := ImportDir(dir, FindOnly)
        want := fmt.Sprintf("%q is not a directory", filepath.FromSlash(dir))