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

cmd/go: generate silently succeeds on non-existent package #61804

Closed
adonovan opened this issue Aug 7, 2023 · 1 comment
Closed

cmd/go: generate silently succeeds on non-existent package #61804

adonovan opened this issue Aug 7, 2023 · 1 comment

Comments

@adonovan
Copy link
Member

adonovan commented Aug 7, 2023

I understand that go generate tries to be robust against many kinds of errors since it is often invoked on a project that won't build, but I don't think it should silently succeed when given the name of a nonexistent package:

$ go help generate
...
Generate processes packages in the order given on the command line, one at a time...
For more about specifying packages, see 'go help packages'.

$ go generate ./nonesuch; echo $?
0
@mvdan
Copy link
Member

mvdan commented Aug 7, 2023

Sounds like a duplicate of #60079 :) At least I wasn't the only one being puzzled by this for a few minutes.

@mvdan mvdan closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants