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

Closed
rogpeppe opened this issue Feb 27, 2018 · 3 comments
Closed

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

rogpeppe opened this issue Feb 27, 2018 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rogpeppe
Copy link
Contributor

rogpeppe 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
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
@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. NeedsFixButNotYet and removed Documentation labels Mar 30, 2018
@rsc
Copy link
Contributor

rsc commented Mar 30, 2018

Probably the loader needs a revamp first.

@rsc rsc added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed NeedsFixButNotYet labels Apr 9, 2018
@gopherbot gopherbot removed NeedsFix The path to resolution is known, but the work has not been done. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 9, 2018
@rsc rsc added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 9, 2018
@rsc
Copy link
Contributor

rsc 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.

@gopherbot
Copy link

Change https://golang.org/cl/122402 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.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants