You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pass a broken pattern, go list is supposed to succeed but have a "package" with the errors in it.
For non existing directory patterns (that start with ./) this works in non module mode, but fails in module mode.
If you are using GOPATH:
% go list -e -json ./non_existant_dir
{
"ImportPath": "golang.org/x/tools/non_existant_dir",
"Match": [
"./non_existant_dir"
],
"Incomplete": true,
"Error": {
"ImportStack": [
"golang.org/x/tools/non_existant_dir"
],
"Pos": "",
"Err": "cannot find package \"golang.org/x/tools/non_existant_dir\" in any of:\n\t/usr/local/google/home/iancottrell/work/go/src/golang.org/x/tools/non_existant_dir (from $GOROOT)\n\t/usr/local/google/home/iancottrell/go/base/src/golang.org/x/tools/non_existant_dir (from $GOPATH)\n\t/usr/local/google/home/iancottrell/work/gopath/src/golang.org/x/tools/non_existant_dir"
}
}
If you are in a module:
% go list -e -json ./non_existant_dir
go: no such directory ./non_existant_dir
The text was updated successfully, but these errors were encountered:
bcmills
changed the title
cmd/go: go list fails the wrong way for non existent directories
cmd/go: 'go list -e' fails to report per-path results for nonexistent directories in module mode
Nov 14, 2018
If you pass a broken pattern, go list is supposed to succeed but have a "package" with the errors in it.
For non existing directory patterns (that start with ./) this works in non module mode, but fails in module mode.
If you are using GOPATH:
If you are in a module:
The text was updated successfully, but these errors were encountered: