-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support building with JDK 21 #234
Conversation
I think we need to bump the version of google-java-format. Error:
Seems related to diffplug/spotless#1819 |
Fixed and tested locally. Fun fact:
|
Currently failing test (can you see the CI job?): org.pkl.codegen.java.CliJavaCodeGeneratorTest
|
Fixed the failing test. I can see the CI job. I just never know when you guys will trigger it. :-) |
Looks like Gradle 7.5 doesn't support Java 21. Another reason to update Gradle. Strange that it worked on my machine. PS: Could you omit |
Ah I didn't realize what the Tests tab does. Getting rid of |
On second thought, I think let's keep |
It's still a poor experience, but OK. I don't recall the last time I ran a Gradle build with --stacktrace. |
Rebased onto #245. |
@bioball Rebased and improved to fix most deprecation warnings |
The only failing CI build is check-patch-file. Not sure what to do about this. |
This means that there was a conflict when applying the You can use If you're curious: we are using this patch file to bump the GraalVM version to 23 only for darwin/aarch64. We don't use Graal 23 otherwise because we need to support JDK11 (for now). Once we drop JDK11 support, we'll bump GraalVM to 23.x and the patch file will go away. |
Sounds cumbersome. Is this the reason why Pkl's dependencies are so outdated? I was planning to send a couple of PRs that gradually update all of Pkl's dependencies. For my understanding, what prevents you from staying compatible with JDK 11 and building native executables with JDK 17, without any further changes? |
@bioball How can we move forward with updating Pkl's dependencies and keeping them up-to-date? |
Is the problem related to newer Truffle library versions requiring Java 17? What's the status of moving to JDK 17? Do users that are still on JDK 11 really need the latest and greatest Pkl Java library version? Can't they stay on 0.25.x until they upgrade to JDK 17? |
RE: Java 11: TBD. This is still something we are coming up with an answer for. But, let's not make any build changes until we have an answer here. If we end up shedding Java 11, there's no need to do any extra work. We can just apply the patch file, commit those changes, and move on. Also, yeah, the issue is that GraalVM's tooling and SDKs dropped support for Java 11, but we needed to make sure that our Java libraries are still compatible. And, there's no reason we can't build the native executables themselves with Java 17. |
- Update google-java-format to a version compatible with JDK 21 and run "gw spotlessApply". - Fix wrong test assumption JavaCodeGenerator writes a properties file using java.util.Properties, which doesn't guarantee order of entries. - Fix most deprecation warnings - Add CI job for JDK 21
Rebased and patch updated. Local build with JDK 21 succeeds. Ready to merge from my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
JDK 21 is an LTS release that reached GA in September 2023.