thomasrebele opened a new pull request, #5092: URL: https://github.com/apache/calcite/pull/5092
This is a rebase of @zabetak's PR https://github.com/apache/calcite/pull/3783. I've fixed some warnings by adapting AsmCheckerTask to Gradle 8. I had to exclude `spark/build/sparkServer/classes`, as the classes in that dir failed the check. I've verified the functionality by building a183b26d64c97f75d1555e2925f2d13a4a5ad8ac (i.e., without the fix for the invalid bytecode of [CALCITE-6393](https://issues.apache.org/jira/browse/CALCITE-6393)) with JDK8. As expected, it produces `java.lang.RuntimeException: Invalid bytecode file:/home/trebele/dev/calcite/c1/core/build/classes/java/main/org/apache/calcite/runtime/SqlFunctions.class` when running `./gradlew build`. The build passes with JDK17 and JDK21. Here the versions that I've used: ``` $ /usr/lib/jvm/java-8-openjdk-amd64/bin/java -version openjdk version "1.8.0_492" OpenJDK Runtime Environment (build 1.8.0_492-8u492-ga~us2-0ubuntu1~24.04.1-b09) OpenJDK 64-Bit Server VM (build 25.492-b09, mixed mode) $ /usr/lib/jvm/java-17-openjdk-amd64/bin/java -version openjdk version "17.0.19" 2026-04-21 OpenJDK Runtime Environment (build 17.0.19+10-1-24.04.2-Ubuntu) OpenJDK 64-Bit Server VM (build 17.0.19+10-1-24.04.2-Ubuntu, mixed mode, sharing) $ /usr/lib/jvm/java-21-openjdk-amd64/bin/java -version openjdk version "21.0.11" 2026-04-21 OpenJDK Runtime Environment (build 21.0.11+10-1-24.04.2-Ubuntu) OpenJDK 64-Bit Server VM (build 21.0.11+10-1-24.04.2-Ubuntu, mixed mode, sharing) ``` ## Jira Link [CALCITE-7649](https://issues.apache.org/jira/browse/CALCITE-7649) ## Changes Proposed This PR proposes to add a check to fail the build if it produced invalid bytecode. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
