Re:Using Makefile(s) for Go
by tedunangst on Tuesday December 10, 2019 @01:20PM
(#21755136)
Tags at least affect the file they're in and no other. Generate lives in one file and does stuff elsewhere.
If I want to know whether a file is built, looking inside is a reasonable thing. If I want to know where generated code comes from, where do I look? How do I know?
I've also never seen anyone call out to protoc from a go generate flag. Sure, you can do that but it hasn't been common in the Go shops I've worked at.
> You can't order your generate commands in a way you want, you have to order them using file order, or keep all of your go generate lines in the same file, which defeats the purpose of go generate.
I've never had a problem with confining generated code to a single file. Do you have more details on why this is a problem? Given that all the files in a package are "flattened" I don't see why this causes a problem...