As you may know, we use the FMPP templating engine and the JavaCC parser generator to generate the parser. Steps are as follows:
1. The source file is core/src/main/codegen/templates/Parser.jj. 2. FMPP generates /core/build/fmpp/fmppMain/javacc/Parser.jj and also babel/build/fmpp/fmppMain/javacc/Parser.jj 3. JavaCC converts these to core/build/javacc/javaCCMain/org/apache/calcite/sql/parser/impl/SqlParserImpl.java and babel/build/javacc/javaCCMain/org/apache/calcite/sql/parser/babel/SqlBabelParserImpl.java 4. Javac compiles these .java files The problem is that the babel/build/fmpp/fmppMain/javacc/Parser.jj seems to be generated from core/src/main/codegen/templates/Parser.jj as it was a few days ago. Hence I get an error: $ ./gradlew clean test > Configure project : Building Apache Calcite 1.31.0-SNAPSHOT > Task :linq4j:jandexMain Could not load entry 744885c2058d06968876b159ce2a1453 from remote build cache: Bucket 'calcite-gradle-cache' not found > Task :babel:javaCCMain FAILED Could not load entry 3d3a41847fa27348c04b50b437780c7a from remote build cache: Bucket 'calcite-gradle-cache' not found Java Compiler Compiler Version 4.0 (Parser Generator) (type "javacc" with no arguments for help) Reading from file /Users/julianhyde/dev/calcite.2/babel/build/fmpp/fmppMain/javacc/Parser.jj . . . Warning: Output directory "/Users/julianhyde/dev/calcite.2/babel/build/javacc/javaCCMain/org/apache/calcite/sql/parser/babel" does not exist. Creating the directory. Note: UNICODE_INPUT option is specified. Please make sure you create the parser/lexer using a Reader with the correct character encoding. Warning: Lookahead adequacy checking not being performed since option LOOKAHEAD is more than 1. Set option FORCE_LA_CHECK to true to force checking. Error: Line 1323, Column 5: Non-terminal AddExpression2b has not been defined. Detected 1 errors and 2 warnings. The error is 'incorrect' - the latest version of Parser.jj does contain AddExpression2b, but somehow the generated Parser.jj does not contain it. Has anyone else seen this stateful behavior from FMPP? Any ideas where the state might reside? I have tried clearing my gradle cache, rebooting my machine, killing gradle daemons, running gradle with the --no-build-cache flag, but no luck. Julian
