|
|
|
|
|
by DyslexicAtheist
3772 days ago
|
|
reproducability is the main issue and IMO determines whether generation is a hassle or not. Unless you have full control over the delivery tool-chain, then generation is not much of a problem, even less so if your stuff is open source. But what if you're building software that generates code for long running projects/code bases (e.g. aircrafts, defence, power-plants, telecom equipment, medical devices, mobile radio base stations). Selecting some closed source tool to generate foo can cost you dearly. You have to version these tools (e.g. the binaries if you don't have the source) to the generaters in your VCS to provide reproducability. Ok you can also ignore all this and simply version what was generated and lose control over the generator but that is a horrid idea and you would never do that of course. |
|
Yes, that would be insane. So don't do it? If you willfully chooses badly suited tools, then you get what you deserve.
> You have to version these tools (e.g. the binaries if you don't have the source) to the generaters in your VCS to provide reproducability.
You can vendor source code generators. If you want to be extra-certain that generator output remains the same across upgrades, you can also check-in the generated code and manually inspect any changes that happen. (I'm assuming relatively sane source code generators that don't intentionally obfuscate things.)
So, yes, if you choose a terrible code generator then you'll be in trouble.
What alternative approaches would you suggest, incidentally, where you're not also just as much at the mercy of the whims of the tools you're using?