From db373e4e1f36fe9858c2ac7b36860214b3070c8c Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Wed, 14 Feb 2018 11:26:36 +0200 Subject: [PATCH] Install all instead of ... go1.10 introduces the cache directory. So now objects will only appear in `pkg` if they are explicitly installed. Previous versions of go would create entries for the transitive dependencies. So for our vendor tests running `go install -i ...` would not create a corresponding file in `pkg` for the vendored packages since `...` does not list vendor. Using `all` instead does include the vendored pkg, so will include the vendored pkgs. This will likely have wider effects on go tooling that rely on pkg. Already filed https://github.com/nsf/gocode/issues/500 for gocode. --- langserver/langserver_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langserver/langserver_test.go b/langserver/langserver_test.go index 049c2e4c..869039d4 100644 --- a/langserver/langserver_test.go +++ b/langserver/langserver_test.go @@ -1257,12 +1257,12 @@ func lspTests(t testing.TB, ctx context.Context, h *LangHandler, c *jsonrpc2.Con // Install all Go packages in the $GOPATH. oldGOPATH := os.Getenv("GOPATH") os.Setenv("GOPATH", tmpDir) - out, err := exec.Command("go", "install", "-v", "...").CombinedOutput() + out, err := exec.Command("go", "install", "-v", "all").CombinedOutput() os.Setenv("GOPATH", oldGOPATH) if err != nil { t.Fatal(err) } - t.Logf("$ go install -v ...\n%s", out) + t.Logf("$ go install -v all\n%s", out) testOSToVFSPath = func(osPath string) string { return strings.TrimPrefix(osPath, util.UriToPath(util.PathToURI(tmpDir)))