tools/go/packages
Michael Matloob f1c1faf65a go/packages: coerce all errors to a single type
Rather than document the range of possible error types, requiring
clumsy client code to extract position information, we now expose a
single concrete type for all errors. Position information (in
standardized string form) is technically optional, but we should
strive for 100%, fixing gaps as they arise.

This change enables us to unify the Package and JSON structs in a
follow-up.

Question: should we eliminate the Config.Error hook and be silent by default?
Pro:
+ most clients suppress it.
Con:
- clients that want to print errors (e.g. vet-like tools) would have
  to traverse the entire import graph to find them.
- silence is not the most fail-safe behavior.

Change-Id: Ie92b9fb7641ceda429f00928474b650d1dfadedd
Reviewed-on: https://go-review.googlesource.com/130576
Reviewed-by: Michael Matloob <matloob@golang.org>
2018-09-04 20:04:35 +00:00
..
gopackages go/packages: rename config.Flags to BuildFlags 2018-08-21 16:42:13 +00:00
doc.go go/packages: smooth API documentation for release 2018-08-17 17:07:05 +00:00
external.go go/packages: rename config.Flags to BuildFlags 2018-08-21 16:42:13 +00:00
golist.go go/packages: rename config.Flags to BuildFlags 2018-08-21 16:42:13 +00:00
golist_fallback.go go/packages: rename config.Flags to BuildFlags 2018-08-21 16:42:13 +00:00
packages.go go/packages: coerce all errors to a single type 2018-09-04 20:04:35 +00:00
packages110_test.go go/packages: switch fallback implementation to use go list 2018-07-26 16:53:35 +00:00
packages_test.go go/packages: coerce all errors to a single type 2018-09-04 20:04:35 +00:00
stdlib_test.go go/packages: use Package as the raw form 2018-08-10 14:45:52 +00:00