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

cmd/go: go list -compiled -e fails returns fails for broken packages #26755

Open
matloob opened this Issue Aug 1, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@matloob
Contributor

matloob commented Aug 1, 2018

This is on tip. go version: go version devel +b8669ef1ce Wed Aug 1 14:29:58 2018 +0000 linux/amd64

go list -e should not fail if there are broken packages, or print errors to standard error, as per the documentation:

The -e flag changes the handling of erroneous packages, those that
cannot be found or are malformed. By default, the list command
prints an error to standard error for each erroneous package and
omits the packages from consideration during the usual printing.
With the -e flag, the list command never prints errors to standard
error and instead processes the erroneous packages with the usual
printing. Erroneous packages will have a non-empty ImportPath and
a non-nil Error field; other information may or may not be missing
(zeroed).

go list -compiled -e breaks this.

Repro:

matloob@matloob:~$ mkdir /tmp/empty
matloob@matloob:~$ cd /tmp/empty
matloob@matloob:/tmp/empty$ devgo version
go version devel +b8669ef1ce Wed Aug 1 14:29:58 2018 +0000 linux/amd64
matloob@matloob:/tmp/empty$ devgo list -e -compiled >/dev/null
go build _/tmp/empty: no Go files in /tmp/empty
matloob@matloob:/tmp/empty$ echo $?
1
@matloob

This comment has been minimized.

Contributor

matloob commented Aug 1, 2018

@myitcv

This comment has been minimized.

Member

myitcv commented Aug 2, 2018

Dup of #25842?

@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Aug 3, 2018

@bcmills bcmills added the GoCommand label Nov 14, 2018

@bcmills bcmills self-assigned this Nov 14, 2018

@bcmills

This comment has been minimized.

Member

bcmills commented Nov 14, 2018

Probably a duplicate, but it wouldn't hurt to test -export and -compiled separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment