chore: avoid Java version mismatch (alternative)#443
Conversation
Signed-off-by: Niels Pardon <par@zurich.ibm.com>
7a69df3 to
87e2673
Compare
|
This change uses within the same task both of these options: The Java 17 javac spec says:
Mixing these options (along with |
I don't think using Jabel caused the build issues I saw it may have contributed to them. The build issues I saw were coming from the Gradle toolchain plugin which was trying to interpret the faulty Gradle configuration and non deterministically picked a JVM that it thought was the best choice. I wasn't aware of Jabel before looking at your PR which led me to investigate how Jabel was supposed to be used which made me aware of some differences in the way substrait-java currently configures the Gradle toolchain vs what the Jabel readme recommends. https://github.com/bsideup/jabel?tab=readme-ov-file#gradle-7-and-newer As I stated in the description of this PR above it still relies on Jabel which comes with its own challenges and potential build issues. EDIT: The |
Here's an alternative to #433 which requires less changes.
Mainly:
Downside of the approach is that we are still relying on Jabel to enable a subset of the newer Java syntax to be compiled by the Java compiler to Java 8 compatible bytecode while especially for Java API changes like
List.of(),Set.of(),Map.of()and a couple others we need to write code that only uses the APIs available in Java 8.