3 ms·
I really don't want any generated code committed to my source control! By its nature, this generated code is repetitive. People will go and manually change a t
by tasuki 3y ago
I really don't want any generated code committed to my source control!
By its nature, this generated code is repetitive. People will go and manually change a thing in the generated code in ten thousand places. Then, when I have to make a change, I have to:
1. Either manually change my thing in ten thousand places (which is a pain)
2. Or use the code generation for my change and also make sure I don't break the previous peoples' manual changes. I don't think this is possible.
> Code generated on the fly during the build process and never committed to source control is a pain, IMHO.
Maybe a pain to debug, but much less of a pain to maintain/change!
- mytailorisrich 3y agoWhy would you allow manual changes to autogenerated code? Isn't the whole point not to manually change it? Autogenerated code is not a pain to maintain and change as long as you have a sensible process...
- tasuki 3y agoHow do you prevent people from manually changing any code which is checked in? Have a CI step run the auto-generation and fail if there's a diff?
- nedbat 3y agoCog can add a checksum to the generated output: https://cog.readthedocs.io/en/latest/running.html#checksummed-output https://cog.readthedocs.io/en/latest/running.html#checksumme...
- mytailorisrich 3y agoCI step, code review. Ideally those steps gate submission to master repo. But even just a big telling-off and revert after the fact (as said those files should have a big warning as header so there is no excuse) if those good practices are not followed as commits should at the very least be monitored manually, and they are obviously visible, anyway.
- deleted 3y ago[deleted]