Open edward3h opened 4 months ago
This is a bug report for GraalVM/Truffle, I'm afraid. Pkl runs on GraalVM 23, which is compatible with JDK 17-21. I expect this to simply go away when we bump to a future GraalVM version that supports Java 22.
FYI, based on this page it appears that Truffle 24+ supports Java 23 now: https://docs.oracle.com/en/graalvm/jdk/23/docs/release-notes/#platform-and-distributions
I think the problem is that Truffle 24+ doesn't support older Java versions. I have some ideas on how to support a wider range of Java versions and avoid getting stuck on EOL'd Truffle/Graal versions. I'll start a discussion after the 0.27 release.
I created a minimal Gradle project to demonstrate the issue. https://github.com/edward3h/pkl-java22-unsafe
When using the pkl code generator in Gradle, on Java 22, I get an exception where this is the root cause:
My projects work ok on Java 21.