Closed abraithwaite closed 2 years ago
Rebase automated generated files isn't a very good idea. I used to just update capnproto files and then regenerate files for all languages. Keeping the time stamp is important because we want to know what is the version of the file. We used to use this to tell if a file is generated by an old version of lua-capnproto which has bugs.
Isn't that why we include the version number though? We could even include a hash to indicate the exact version. Timestamps in generated code (binary or source) is bad. It prevents you from being to easily verify that two compilers on separate machines are producing the same code.
I agree, hash would be a better way of versioning. lua-capnproto gets it input from capnp command, and capnp doesn't pass any version information. So that's why I use timestamp here as a simple version. I don't agree that putting timestamps in generated code (binary or source) is bad. Sometimes information like when a binary is built can be useful. If this is causing git conflicts, then I think this is a workflow problem, not a timestamp in generated file problem. If it's the same conflict, you can always use "git rerere" to record the solution and it will automatically resolve it next time.
This causes issues for automating things and deterministic builds.
My most recent example is trying to rebase with auto generated files which should be the same conflict because of the timestamp.