It actually IS very helpful to see what changes in the code generation produce in differences in the output. It has saved me multiple times in other languages before.
Chris From: Ben Hutcheson <ben.hut...@gmail.com> Date: Friday, 25. November 2022 at 21:45 To: dev@plc4x.apache.org <dev@plc4x.apache.org> Subject: Re: [DISCUSS] Check in generated Java code? +1 I like the idea of keeping a history of what has changed. This may help? https://medium.com/@clarkbw/managing-generated-files-in-github-1f1989c09dfd On Fri, Nov 25, 2022 at 9:03 AM Łukasz Dywicki <l...@code-house.org> wrote: > -1 from my side > > I don't think its a good idea, generated code currently changes far too > often to make sense of it and its history. We rather track code for > generators and templates which produce it. As long as language is fine > with automatically generated sources, I opt for not polluting our SCM > with millions of LOCs which bring no real value. > > Letting people checkout and play is fine, but lets face truth, people > who would like to do quick start have to install some kind of maven > tooling which will generate code for them anyway. > If interested party is not using any IDE, it will still need a command > line tool to compile sources. > > Best, > Łukasz > > On 25.11.2022 11:27, Christofer Dutz wrote: > > Hi all, > > > > I know it’s sort of considered bad practice to check in generated code, > when you’re working with maven. > > > > However, we’ve already started to check-in generated code for all other > languages. > > Especially today when working on the Time and Date stuff I really have > learned to appreciate to see what changed, when working on code-generation. > > > > I would like to propose to also start checking in the generated > java-code. > > > > But I would like to generate it into a separate directory and use the > build-helper-plugin in order to keep things separate (This way we can > simply delete the directory, run the build and we get rid of obsolete types) > > > > I would propose to generate code into a “src/main/generated” directory. > > > > The upside would be: Everyone can simply check out plc4x and use it in > any IDE without having to build first. > > > > What do you folks think? > > > > > > Chris > > >