tools/go
Bryan C. Mills 84988e2dba go/packages: do not error out for patterns that match no packages
The documentation for Load says:
“Load returns an error if any of the patterns was invalid as defined
by the underlying build system. It may return an empty list of
packages without an error, for instance for an empty expansion of a
valid wildcard. Errors associated with a particular package are
recorded in the corresponding Package's Errors list, and do not cause
Load to return an error.”

Therefore, it should not be an error for a pattern to match no
packages. If the pattern is a literal package path that does not
exist, we should prefer to return a *Package for it with an error in
the Errors field.

Change-Id: Iaecfb920097e3b520e763bd52c0e326d2e7a4861
Reviewed-on: https://go-review.googlesource.com/137075
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2018-09-28 12:33:17 +00:00
..
analysis go/analysis/passes/vet: fork cmd/vet@31d19c0 2018-09-27 19:02:35 +00:00
ast/astutil imports: fix lost line between package and import statement 2018-07-10 02:38:27 +00:00
buildutil go/...: make most tests pass with gccgo 2018-06-08 16:58:49 +00:00
callgraph go/callgraph/cha: fix bug computing correspondence of abstract/concrete methods 2018-02-21 01:23:17 +00:00
cfg go/cfg: a syntactic control-flow graph (CFG) 2018-09-26 00:57:46 +00:00
gccgoexportdata go/gccgoexportdata: correctly handle archive files containing string tables 2016-11-09 21:28:38 +00:00
gcexportdata go/gcexportdata: add -package flag to diagnostic tool 2018-06-27 17:17:06 +00:00
internal go/internal/gccgoimporter: remove special case for Go1.9 2018-09-27 15:01:54 +00:00
loader go/internal/cgo: simplify names of ProcessCgoFiles and RunCgo 2018-08-08 19:23:19 +00:00
packages go/packages: do not error out for patterns that match no packages 2018-09-28 12:33:17 +00:00
pointer go/pointer: support reflect.Value in AddExtendedQuery 2018-08-13 20:51:10 +00:00
ssa go/ssa/interp: skip failing test 2018-09-25 15:50:07 +00:00
types/typeutil go/types/typeutil: add StaticCallee helper function 2018-09-17 22:04:51 +00:00
vcs go/vcs: match go-import package prefixes by slash 2018-06-20 03:09:55 +00:00