Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/vgo: list -e doesn't continue after errors #24149

rogpeppe opened this issue Feb 27, 2018 · 3 comments


Copy link

commented Feb 27, 2018

go version devel +104445e Wed Feb 7 19:22:09 2018 +0000 linux/amd64 vgo:2018-02-20.1

When I run the go list command with the -e flag, it succeeds even if the package is erroneous (for example if there are no Go files in the package directory.

This does not seem to be the case with vgo.
For example:

% vgo list -e database
vgo: import "database" [/home/rog/go/src/database]: no Go source files

With the go command:

% go list -e database

This means that a standard idiom for finding out the root directory of a module (go list -e -f '{{.Dir}}') does not work when the root directory of the module doesn't have any Go files in it.

@gopherbot gopherbot added this to the vgo milestone Feb 27, 2018

@rsc rsc changed the title x/vgo: list -e doesn't work as documented x/vgo: list -e doesn't continue after errors Mar 30, 2018


This comment has been minimized.

Copy link

commented Mar 30, 2018

Probably the loader needs a revamp first.


This comment has been minimized.

Copy link

commented Jul 5, 2018

This is working for me at least. Perhaps it requires CL 121303 or one of my other pending CLs. I will send a CL adding a test and marking this fixed.


This comment has been minimized.

Copy link

commented Jul 5, 2018

Change mentions this issue: cmd/go/internal/list: implement and test list -m -e for plain arguments

@golang golang locked and limited conversation to collaborators Jul 12, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
3 participants
You can’t perform that action at this time.