]> Cypherpunks repositories - gostls13.git/commit
cmd/go: emit go list error for local non-existant packages
authorJay Conrod <jayconrod@google.com>
Wed, 28 Nov 2018 21:33:23 +0000 (16:33 -0500)
committerJay Conrod <jayconrod@google.com>
Tue, 4 Dec 2018 00:19:55 +0000 (00:19 +0000)
commitc2412a7681d5beaeb5a4ceef3b2b7886361282ce
treeb0aff60ecdbff2ab7874173940c70a8a657d8d55
parent58ffe5059fa73b1f35aa354bb4d0ca97601606fb
cmd/go: emit go list error for local non-existant packages

In CL 129061, a check was added for patterns that reference
nonexistent local directories. While this prevented unnecessary
network lookups (fixing #26874), it caused "go list -e" to exit with
an error instead of listing packages with error messages.

This change avoids the network lookup and does not exit for these
kinds of packages. Errors are still reported by
internal/load.LoadImport for packages that don't exist.

Fixes #28023

Change-Id: I0a648269e437aed3a95bfb05461a397264f3793f
Reviewed-on: https://go-review.googlesource.com/c/151800
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modload/load.go
src/cmd/go/testdata/script/mod_fs_patterns.txt
src/cmd/go/testdata/script/mod_list_dir.txt