substrait-io / substrait-java

Apache License 2.0
72 stars 70 forks source link

chore: shadow ANTLR dependency #258

Closed Blizzara closed 1 month ago

Blizzara commented 1 month ago

ANTLR had a breaking change in its serialization format between 4.9 and 4.10+, meaning libraries that depend on one are incompatible with libraries that depend on another.

Spark (until Spark 4.x) depends on ANTRL 4.9, so this project bumping ANTLR 4.10+ made it impossible to use both Spark and substrait-java in the same project.

Shadowing and relocating the ANTLR dependency removes the issues with incompatibility since substrait-spark's ANTLR is now independent of any other ANTLRs.

bestbeforetoday commented 1 month ago

I defer to people more expert in Gradle than me to say whether it's the optimal implementation, but it does seem to produce the correct result for me using the generated Maven artifacts. 👍