From ff2f851af1dba1155cf5d072054c5da98f3b2756 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Sun, 30 Sep 2012 15:56:23 +1000 Subject: [PATCH] exp/types: permit importing packages without available source. R=gri, iant CC=golang-dev https://golang.org/cl/6586051 --- src/pkg/exp/types/gcimporter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkg/exp/types/gcimporter.go b/src/pkg/exp/types/gcimporter.go index 64c7b2a09ad..8441669129e 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 }