tools/go/packages
Michael Matloob 91f80e683c go/packages: use absolute path of dir in call to go list for file= query
When running go list for a file= query, the go/packages code previously ran "go list ." command in the directory of the provided file. This was necessary for compatibility with the fallback, but caused problems when running file= queries for files in the module cache. We now use absolute directory paths (supported in Go >=1.11) in the non-fallback case and retain the previous behavior in the fallback case.

Change-Id: I3a9feaaeda12e068ec3d510b5f78437482c65b4c
Reviewed-on: https://go-review.googlesource.com/c/148199
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2018-11-21 19:39:51 +00:00
..
gopackages go/packages: remove the Config.Error hook 2018-09-04 20:52:37 +00:00
packagestest go/packages/packagestest: adds a benchmark version of TestAll 2018-11-21 19:29:16 +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: change driver communication mechanism 2018-11-21 18:20:56 +00:00
golist.go go/packages: use absolute path of dir in call to go list for file= query 2018-11-21 19:39:51 +00:00
golist_fallback.go go/packages: fix flaky TestJSON and reenable it on Go 1.10 2018-11-12 16:24:42 +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 minor godoc typo 2018-11-09 17:23:37 +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 flaky TestJSON and reenable it on Go 1.10 2018-11-12 16:24:42 +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 .s files from go list's CompiledGoFiles 2018-11-13 00:58:03 +00:00
visit.go go/packages: make visit order stable 2018-11-02 02:37:01 +00:00