reta opened a new issue, #11788:
URL: https://github.com/apache/lucene/issues/11788

   ### Description
   
   The Apache Lucene is using quite old version of ANTLR 4.5.1-1. By itseld, it 
is not a showstopper, but more profound issue is that some ANTLR 3.x bits are 
used [1]. Since ANTLR 4.10.x (or even earlier), the compatibility layer with  
`3.x` release line has been dropped in `4.x` (see please [2]), which makes 
Apache Lucene impossile to use with recent ANTLR 4.10.x+ releases [3]. The 
sample exception is below. 
   
   ```
      >         java.lang.UnsupportedOperationException: 
java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not 
deserialize ATN with version 3 (expected 4).
      >             at 
org.antlr.antlr4.runtime@4.11.1/org.antlr.v4.runtime.atn.ATNDeserializer.deserialize(ATNDeserializer.java:56)
      >             at 
org.antlr.antlr4.runtime@4.11.1/org.antlr.v4.runtime.atn.ATNDeserializer.deserialize(ATNDeserializer.java:48)
      >             at 
org.apache.lucene.expressions@10.0.0-SNAPSHOT/org.apache.lucene.expressions.js.JavascriptLexer.<clinit>(JavascriptLexer.java:279)
   
   ```
   
   [1] 
https://github.com/apache/lucene/blob/main/lucene/expressions/src/java/org/apache/lucene/expressions/js/JavascriptLexer.java#L189
   [2] 
https://github.com/antlr/antlr4/commit/c68e127a7cf14470565d6e6ae1eff06db3e56ea7
   [3] https://github.com/opensearch-project/OpenSearch/pull/4546
   
   @uschindler @jpountz any objections in migrating to ANTLR `4.11.1`? I would 
be happy to offer my help here, thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to