From: David Symonds Date: Sun, 30 Sep 2012 05:56:23 +0000 (+1000) Subject: exp/types: permit importing packages without available source. X-Git-Tag: go1.1rc2~2286 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ff2f851af1dba1155cf5d072054c5da98f3b2756;p=gostls13.git exp/types: permit importing packages without available source. R=gri, iant CC=golang-dev https://golang.org/cl/6586051 --- diff --git a/src/pkg/exp/types/gcimporter.go b/src/pkg/exp/types/gcimporter.go index 64c7b2a09a..8441669129 100644 --- a/src/pkg/exp/types/gcimporter.go +++ b/src/pkg/exp/types/gcimporter.go @@ -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 }