You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation from #1094 doesn't consider the modification times of imported grammar files to determine if the grammar needs to be rebuilt.
I think properly tracking this would require that the antlr tool produce a dependency file that can be consumed by later runs. That's something that might take some time to get implemented, in the meantime it'd be good to have a configuration to the plugin to toggle the "smart" regeneration behavior on/off. It'd be my preference that it defaults to off since that will produce correct results in the default configuration but allow individuals to turn it on if they need faster builds and know it wouldn't cause them any problems.
The text was updated successfully, but these errors were encountered:
A similar issue: If a grammar is split into lexer and parser grammars and the parser uses the vocab from the lexer (which is probably the norm?), changing only one part does not re-generate the other - possibly leading to errors because the tokens are out-of-sync.
I found this issue so annoying that I patched the plugin to detect non-combined grammars just by naming convention (search for NameLexer.g4 if NameParser.g4 is given and vice versa) and always re-generate both if either is modified.
But a more sophisticated approach like suggested by @greedy that actually analyses the files seems like the right approach.
I've added a PR for this that addresses both mentioned use cases: #1353
It seems the used test harness requires Java 8, though. I've ran into dependency issues with the maven test harness and therefore used a different plugin that seems to be better anyway.
As the JDK requirement for the build environment is about to be changed, maybe this is ok. Otherwise I might be able to adjust the unit test. Just let me know. Thanks.
The implementation from #1094 doesn't consider the modification times of imported grammar files to determine if the grammar needs to be rebuilt.
I think properly tracking this would require that the antlr tool produce a dependency file that can be consumed by later runs. That's something that might take some time to get implemented, in the meantime it'd be good to have a configuration to the plugin to toggle the "smart" regeneration behavior on/off. It'd be my preference that it defaults to off since that will produce correct results in the default configuration but allow individuals to turn it on if they need faster builds and know it wouldn't cause them any problems.
The text was updated successfully, but these errors were encountered: