-
Notifications
You must be signed in to change notification settings - Fork 475
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
Gradle only builds with Java 22, which is EOL #877
Comments
Would it be reasonable to assume that when Java 23 hits EOL that Nixpkgs will also remove it?
We use 22 (A non LTS release) because:
We use toolchain support to ensure anyone building should get the same exact output. It also sets all the respective compiler versioning arguments. Sorta related, I noticed a while ago that Gradle had stopped auto-downloading JDK's for toolchain usage a couple versions ago. I meant to address that so building would be less of an involved process for users who don't already have a 22 JDK installed, but never got around to it. We can do that by utilizing the foojay toolchain plugin. |
Yes. As far as I can tell Nixpkgs only supports Java 8, 11, 17, 21 and 23 in the source tree — everything else is flagged as broken and unsupported since maintaining EOL versions turned out to be too much of a burden (see NixOS/nixpkgs#313216, NixOS/nixpkgs#310466, NixOS/nixpkgs#313210) Also, downloading a JDK would also not be ideal for Nixpkgs since build environments are sandboxed and programs do not have internet access. The only reason that Gradle still somehow works is because we use a man-in-the-middle cache which has all dependencies prefetched and locked at specific versions and hashes, and in the build process we hijack any network requests to return dependencies from the cache. Yes, it's janky, but it achieves the same effect of reproducibility. |
So the FFM API is also stable in Java 23, no? |
I'm going to keep 22 as the build target for now, but I have addressed the issues seen when updating it to 23. If you're consuming the repo and doing builds in a 23 environment, find/replace the version to what you want and it should build now. |
As this comment in #865 pointed out, currently the build script arbitrarily sets the
languageVersion
to only Java 22 and not Java 23, preventing it from building on Java 23. This is especially problematic when working with package libraries like Nixpkgs, which has already removed Java 22 as it has reached its EOL date in September 2024.Please remove the version specifier, or maybe setting a minimum version requirement rather than an exact one.
The text was updated successfully, but these errors were encountered: