What did you do?

go generate accepts a number of packages as arguments, packages on which to run go generate. go generate -help makes no mention of the order in which those packages will be go generate-d

The lack of any mention on the order of execution might well be intentional...

But in any case I'd like to propose we define the order and document it (this issue could conceivably be a proposal, very happy to redo as such)

The use case stems a use case where go generate-ors end up parsing dependencies in order to make decisions on their output. In this context, having go generate run in reverse dependency order (there's probably a more precise term?) on the set of packages provided as arguments avoids the need to re-run go generate multiple times (which incidentally is the current alternative, clearly not ideal)

What did you expect to see?

"Expect" is not the correct word here... because the order is unspecified I can't reasonably have an expectation. More a "hope" perhaps that:

go generate should run in reverse-dependency order on the set of packages passed to it as arguments.