o3de / o3de-azslc

Amazon Shader Language (AZSL) Compiler
Other
23 stars 14 forks source link

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

Open jeremyong-az opened 2 years ago

jeremyong-az commented 2 years ago

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.

siliconvoodoo commented 2 years ago

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

jeremyong-az commented 2 years ago

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).

siliconvoodoo commented 2 years ago

Good points