marcohu / rules_antlr

ANTLR rules for Bazel
Apache License 2.0
26 stars 36 forks source link

Provide a unique output dir per set of source files. #23

Open criemen opened 1 year ago

criemen commented 1 year ago

This is an attempt to make multiple rules_antlr invocations work without sandboxing (eg on Windows, where there's no sandbox). Test with --spawn_strategy=local.

Before, the AntlrRules.java code would fail, as it'd find generated grammar files without sandboxing it didn't know about. Fix this by providing a unique directory per grammar that's being compiled. The code that throws the exception is https://github.com/marcohu/rules_antlr/blob/master/src/main/java/org/antlr/bazel/AntlrRules.java#L619.