Closed SethTisue closed 10 months ago
Thanks for reporting, @SethTisue . I’ll take a look…
WIP on branch issue-62-community-build-jdk-22
.
First off, I noticed that the community build americium.conf
has some workaround flags defined (https://github.com/scala/community-build/commit/b2758825b8d4600fd23e4da77b64334002ff87b7) - the Scala versions have been bumped to 2.13.12 and 3.3.1 as of Git commit SHA: d229de71574c2e3135b5adda3266afd88a2b69d0.
After some faffing around getting SBT to play with JDK 22, the reported problem is reproduced locally:
Something is awry with Lombok code generation...
The problem isn't due to the -source
or -target
Java compiler options being set to "22" as opposed to "1.9". As of commit 44363e57a28541e9283b368579fcc82a70ff627d, the old Java source and target settings were reinstated, but SBT was run inside IntelliJ using IntelliJ to control the choice of JDK.
Running SBT under JDK 20, all is fine and Lombok generates the necessary builder method. Running SBT under the early-access JDK 22, Lombok fails to generate the builder method.
I did wonder whether the SBT version upgrade from 1.8.3 to 1.9.7 might have had a bearing, but if so, this has been a problem since 1.9.0-RC1. Given the build is successful under JDK 20, I'm inclined to keep the hypothesis simple and blame either Lombok itself running within JDK 22 or something about the interaction between SBT and Lombok that doesn't play well with JDK 22...
Rather than fight the unholy trinity of SBT, Lombok and JDK 22, having noticed that the class exhibiting the missing symbol was deprecated, I've avoided the issue by removing it a little earlier than I'd envisioned as of Git SHA e9c114fa8f2c5e53c7a9da799e60f2c9c611dfce.
@SethTisue I've fast-forwarded the master
branch to e9c114fa8f2c5e53c7a9da799e60f2c9c611dfce; this builds cleanly with SBT under JDK 22, although for now it continues to target JDK 19 for the compiled outputs.
I did however locally modify build.sbt
to target JDK 22 for the compiled outputs, and this also built cleanly, passing the tests, so in theory the community build should be OK for Americium.
I'm not sure whether you manually edit the .conf
files or run a job to pick up the latest changes, but either way, it's there for you to wave your magic wand over. :smile:
I have some general code cleanup to do engendered by this work, so I'll leave this ticket open for a while and won't do a release just yet.
If there are further issues with the community build, let me know on this ticket...
this came up over at https://github.com/scala/community-build/issues/1698
the error log is at https://scala-ci.typesafe.com/job/scala-2.13.x-jdk22-integrate-community-build/5/artifact/logs/americium-build.log
obviously it's early to be worrying about JDK 22, but reporting regardless :-)