/ go Public
cmd/go: "go generate" appears to be a silent no-op when given a missing package #60079
The path to resolution is known, but the work has not been done.
What version of Go are you using (
Does this issue reproduce with the latest release?
Yes; appears to happen with 1.20.4 as well.
What operating system and processor architecture are you using (
What did you do?
What did you expect to see?
Both commands should fail on a missing package.
What did you see instead?
go generateappears to happily do nothing.
It could be due to its nature of working with broken packages, for example if the generated files are required for the package to typecheck but they are missing. However, if the package can't be located at all, that should clearly be an error. I had a weird issue at work where I thought my generator wasn't working, simply because I was making a typo when writing
go generate ./some/pkg.
The text was updated successfully, but these errors were encountered: