3 ms·
This is just integrated codegen into the build tool, right? Datadog has a similar project here https://github.com/DataDog/orchestrion https://github.com/DataDog
by sluongng 2y ago
This is just integrated codegen into the build tool, right? Datadog has a similar project here https://github.com/DataDog/orchestrion https://github.com/DataDog/orchestrion that does the same thing.
I think this kind of code gen is very wonky, and hard to debug unless there is some official API support for it. Using a sufficiently advanced build tool to handle this in a separate build step would help as well. But that usually causes problems with IDE support.
- jakewins 2y agoYeah, this reminds me a lot of similar practices in the JVM world with compile time annotation processors. Bugs in those systems are hell to trace. Coming to the Go world of “if you’re gonna do code generation, write a dumb program that generates source code text, run it and check the result into source control” was a revelation - yeah, it’s ugly, but guess what? It can be debugged by human beings.
- elcritch 2y agoIt depends more on whether the language tooling supports it. I used Lombok back in the day with Netbeans. When properly setup it would pop to the generated code when debugging or if you went to a definition, pretty easy.