]> Cypherpunks repositories - gostls13.git/commitdiff
exp/types: permit importing packages without available source.
authorDavid Symonds <dsymonds@golang.org>
Sun, 30 Sep 2012 05:56:23 +0000 (15:56 +1000)
committerDavid Symonds <dsymonds@golang.org>
Sun, 30 Sep 2012 05:56:23 +0000 (15:56 +1000)
R=gri, iant
CC=golang-dev
https://golang.org/cl/6586051

src/pkg/exp/types/gcimporter.go

index 64c7b2a09ad3bdf8a8fd023536f33da5bc60ad14..8441669129e6392a4744d6f86cc898187e863f94 100644 (file)
@@ -42,7 +42,8 @@ func FindPkg(path, srcDir string) (filename, id string) {
        switch {
        default:
                // "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x"
-               bp, _ := build.Import(path, srcDir, build.FindOnly)
+               // Don't require the source files to be present.
+               bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary)
                if bp.PkgObj == "" {
                        return
                }