tools/go
Alan Donovan 0f870d4d86 go/loader: fix interaction of cwd and vendor
Packages specified on the command line should be interpreted relative to
cwd iff they are local (e.g. ./http within $GOROOT/src/net), otherwise a
request for, say, "golang.org/x/net/http2/hpack" might return the vendored
package depending on the working directory.

The FindPackage hook function now takes a build.ImportMode parameter, so
it matches the signature of (*build.Context).Import.  The AllowVendor
flag is enabled only for imports within source files, but not for the
initial packages.

+ test.

Change-Id: I756dc46b70928d2fd9f824e6670092d8169e0d64
Reviewed-on: https://go-review.googlesource.com/18318
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-06 18:28:16 +00:00
..
ast/astutil go/ast/astutil: set Pos for import name 2015-05-19 23:10:16 +00:00
buildutil refactor/importgraph: reduce I/O concurrency to avoid EMFILE 2015-12-30 22:01:03 +00:00
callgraph go/ssa: rename some API features (incompatible change) 2015-08-31 22:20:12 +00:00
exact tools: add import comments. 2014-12-09 22:42:16 +00:00
gccgoimporter x/tools: disable tests not supported on Android 2015-08-06 00:36:03 +00:00
gcimporter go/types: change {Type,Object,Selection}String to accept a Qualifier function 2015-06-30 19:00:00 +00:00
importer go/importer: in TestImportStdLib, skip 2 packages that use vendoring 2015-12-28 21:28:10 +00:00
loader go/loader: fix interaction of cwd and vendor 2016-01-06 18:28:16 +00:00
pointer go/pointer: fix bug in constraint generation of "for _, v := range map" 2015-10-26 16:28:05 +00:00
ssa go/ssa/interp: enable support for Example tests 2015-12-28 21:19:28 +00:00
types go/types: in TestStdlib, skip 2 packages that use vendoring 2015-12-28 21:04:49 +00:00
vcs go/vcs: workaround EOF bug in token-based XML decoder 2015-12-29 20:27:04 +00:00