o3de-azslc icon indicating copy to clipboard operation
o3de-azslc copied to clipboard

Generated files (from ANTLR) should be not be checked in

Open jeremyong-az opened this issue 2 years ago • 3 comments

Using CMake commands such as add_custom_command in conjunction with add_custom_target, it should be relatively straightforward to emit the generated grammar file as part of the build, with the token/bnf files as dependencies. This way, they would not need to be checked in and remove a source of possible error with the source files going out of sync with the generated files. More importantly, this change would make grammar changes easier to review.

jeremyong-az avatar Aug 25 '22 21:08 jeremyong-az

The original rationale was to allow easier code contribution for devs who haven't installed the JDK.

siliconvoodoo avatar Sep 06 '22 08:09 siliconvoodoo

Yea, that makes sense, but chances are the JDK isn't too steep a requirement for people wanting to build azslc. I think we get more value in the long run with having leaner code reviews. Note that if the generated files are checked in, it's very difficult to verify that the committer is actually checking in the right data (let alone maliciously modifying it).

jeremyong-az avatar Sep 12 '22 16:09 jeremyong-az

Good points

siliconvoodoo avatar Sep 14 '22 03:09 siliconvoodoo