In this gist I want to highlight two points:
- Never modify generated code
- Never put generated code into repository
I am talking about JTango, namely its IDL module (link). JTango is a Java implementation of TANGO Controls - a widely used SCADA framework.
But this gist is not specificlay about JTango itself. It is about the fact that JTango uses CORBA stubs generated from IDL i.e. it uses generated code.
For historical reason (long before I came to the project) these stubs were generated once in a while and stored in the repository. At some point we decided to migrate to maven. As maven has plugins for everything why not to generate these stubs each time we build the project. Apart from the fact that it simply feels right, we benefit from IDL compiler and CORBA implementation consitency: