3 ms·
I like checking it in; on balance, I think it makes life nicer: Simpler to get started running the code, less compute wasted running generators (this is especi
by dilap 5y ago
I like checking it in; on balance, I think it makes life nicer:
Simpler to get started running the code, less compute wasted running generators (this is especially nice when doing something like bisect), and it's nice to be able to just see all your code, right there in the repo.
I actually think the biggest downside is the diffs -- often there's no easy way (e.g. in GitHub) to hide all generated code, which can be annoying.
Merge conflicts don't bother me at all, since they're so easy to resolve; I agree with your colleagues there.
(Though that would be trickier if you had files mixing generated and hand-written code! Contra the original article, my instincts/advice would be to always keep generated code well-isolated from hand written code, ideally using some standard convention [e.g., all generated stuff is in /generated/ path].)
- HelloNurse 5y agoKeeping generated code in a segregated source code repository, with the advantage of inspecting diffs without file pollution, should be technically easy. Commands to take snapshots of every build ("git add *", "git commit", "git rev-parse" on the actual source repository, "date" etc.) are easy to script.