tools/go/packages
Ian Cottrell fc67db3d9a go/packages: fix crash
This is based on 147340 and has the same test, but with a different fix.
We now produce a nice error if there is an empty root, instead of
crashing, and the cause of empty roots in go list has been fixed.
The underlying call to go list is returning the same package more than
once, and we only fix the first entry in the root list, so the second
one got left blank.
The fix was to not add the second duplicate copy to the output of the
driver at all.

Change-Id: I9f1b2f0fd63635ba101cdd3c8a5108530e968ba9
Reviewed-on: https://go-review.googlesource.com/c/147440
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2018-11-05 21:21:22 +00:00
..
gopackages go/packages: remove the Config.Error hook 2018-09-04 20:52:37 +00:00
packagestest go/packages: small fixes 2018-11-02 22:11:10 +00:00
testdata go/packages: add name= query 2018-10-16 20:20:09 +00:00
doc.go go/packages: remove scary warning on documentation 2018-10-15 17:50:52 +00:00
example_test.go go/packages: remove the Config.Error hook 2018-09-04 20:52:37 +00:00
external.go go/packages: do not error out for patterns that match no packages 2018-09-28 12:33:17 +00:00
golist.go go/packages: fix crash 2018-11-05 21:21:22 +00:00
golist_fallback.go go/packages: sort root list in Load 2018-10-29 18:14:17 +00:00
golist_fallback_testmain.go go/packages: add missing test variants to fallback loader 2018-09-25 16:56:39 +00:00
packages.go go/packages: fix crash 2018-11-05 21:21:22 +00:00
packages110_test.go go/packages: generate test main files from the golist fallback 2018-09-17 22:19:12 +00:00
packages_test.go go/packages: fix crash 2018-11-05 21:21:22 +00:00
packagescgo_test.go go/packages: skip TestLoadImportsC when Go has been built without cgo 2018-10-05 20:28:39 +00:00
stdlib_test.go go/packages: remove the Config.Error hook 2018-09-04 20:52:37 +00:00
visit.go go/packages: make visit order stable 2018-11-02 02:37:01 +00:00