-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
JDK updates and removals #344544
JDK updates and removals #344544
Conversation
Not going to fix the nixpkgs-vet warning given that it would result in inconsistency with all the other Zulu versions (and the Zulu packaging pattern wouldn’t work with |
pkgs/top-level/aliases.nix
Outdated
@@ -1163,8 +1163,13 @@ mapAliases { | |||
openjdk20_headless = openjdk20; # Added 2024-08-01 | |||
jdk20 = openjdk20; # Added 2024-08-01 | |||
jdk20_headless = openjdk20; # Added 2024-08-01 | |||
openjdk22 = throw "OpenJDK 22 was removed as it has reached its end of life"; # Added 2024-09-24 | |||
openjdk22_headless = openjdk20; # Added 2024-09-24 |
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.
openjdk22_headless = openjdk20; # Added 2024-09-24 | |
openjdk22_headless = openjdk22; # Added 2024-09-24 |
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.
Whoops; fixed.
The OpenJDK 22 files still seem to be in the repository, might be an oversight. |
@emilazy Thank your for your feedback. I have integrated Corretto because it is used in my organization. Several other people had requested it in the past. Several people have expressed the need for corretto on Darwin which currently doesn't exist. Here is a non-working/draft PR for some context. In my case, the build infrastructure locks down the used Java version (via gradle, One thing I'd like to explore in the future is separate the corretto build from the OpenJDK builds. Currently, |
I concur, unless there is a maintainer committed to maintaining those variations I would also be in favor of just removing them as much as possible. Otherwise they will just bit rot (e.g. stop building) or be a security issue since they get terrible out of date. In my opinion we need to maintain the minimal amount of JDKs possible: so if we need e.g. Zulu JDK8 to bootstrap other JDK for Darwin let's just keep that specific version (this is an example, not sure how Darwin bootstrap works). And ideally keep only OpenJDK as the way to go for Java here in nixpkgs. |
I am committed to maintain Corretto on Linux. I use this daily. I have updated it regularly (here is my latest approved-but-not-merged-PR). |
8ce2409
to
ee4f58c
Compare
I believe that jdk21, jdk17, jdk11 and jdk8 require an update as well. For each of these a new version is available, and they have not been updated in quite a while. |
Yeah, rebase calamity. Fixed.
Fair enough. It’s a bit weird to me that people are pinning requirements for what are, to my understanding, basically builds of the same source code with a handful of patches on top, but clearly there’s some benefit to having it. Since they only ship LTS releases and you’re keeping it cared for, it didn’t cause me any maintenance burden here, and so I have no particular motivation to push for its removal :) Thanks for putting in the maintenance work.
Using Zulu to bootstrap our source OpenJDK 8 on In fact, I would personally lean towards just dropping JDK 8 sooner. Debian already has, for instance.
And this is why shipping five versions of the JDK with the maintainer resources we seem to have is a pain… I’ll see if I can bump them. |
Oh no, I didn't mean to build OpenJDK 8 for aarch64-darwin from Zulu 8, that was an example (e.g.: if we need any JDK8 to bootstrap the remaining OpenJDK versions that we care, we could use Zulu 8 and keep only that in nixpkgs, dropping the other versions). I completely agree that we should not care about having a working OpenJDK 8 build for aarch64-darwin, unless there is official support in upstream.
That I am not completely sure. If there is no packages in nixpkgs that depends on JDK 8 I think it is fine, but there are probably some users of Java 8 out there. I don't think there are a lot of them though, but it is difficult to have any idea of package usage in nixpkgs. |
ee4f58c
to
f74441c
Compare
f74441c
to
e61a160
Compare
Pin the latest LTS version for consistency with OpenJDK.
e61a160
to
4383a5e
Compare
Sigh. |
9f01c7b
to
e903e86
Compare
(Oops, I forgot to post this.)
I think we bootstrap all versions from an equal Temurin version now, so bootstrap shouldn’t be an issue. The Temurin 8
Yeah, there’s some reverse dependencies. But I have a very particular set of skills. We are, in any case, going to have to deal with the situation once EOL happens. |
All the builds went through. This should be ready, modulo version stuff. |
This requires Java 21 but OpenJFX ≥ 22. As OpenJFX 22 is EOL, we use OpenJFX 23, which technically only supports down to JDK 21, but let’s hope for the best.
Actually, nobody even got around to making an alias for this one…
e903e86
to
d19c7e8
Compare
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.
Eval error, can you take a look @emilazy? |
@ofborg eval |
Seems to be a transient issue. |
Description of changes
OpenJDK 23 is out, and 22 is end‐of‐life. This packages the new version for OpenJDK source builds, Temurin, and Zulu. I opted to drop the old versions entirely because these non‐LTS releases get released and go EOL every 6 months anyway so I don’t think it makes sense to carry around old derivations marked as insecure for versions with such short shelf lives. Sadly a few things aren’t ready for 23 yet (e.g. because of using the abandoned string template preview proposal), and have been marked as broken.
Some general thoughts on Nixpkgs JDK packaging from an outsider:
OpenJDK source, Temurin, Semeru, Zulu, and Corretto feels like a needlessly high number of JDK distributions to me. Semeru has OpenJ9 and source builds have obvious value. I don’t see a good reason for us to have both Temurin and Zulu. It seems like we use Zulu on Darwin because it supports JavaFX and supports
aarch64-darwin
further back than Temurin does (because Temurin relies on upstream OpenJDK which hasn’t backportedaarch64-darwin
support to JDK 8). I think if we could get the OpenJDK/OpenJFX source builds working on Darwin and bootstrap them from Temurin it would be a nicer situation overall; not supporting JDK 8 onaarch64-darwin
seems okay. Zulu is pretty neglected, given its tedious manual update process; every Zulu JDK was out of date. If we stop using it on Darwin, I think it could reasonably be removed. (Switching from Temurin to Zulu for bootstrap might also be an option, if the derivation can be made more maintainable.) I’m not sure about the motivation for carrying Corretto; cc @rollf?8, 11, 17, 21, and the latest version is… also a lot of versions to deal with. Backporting FFmpeg changes to old OpenJFXes was fairly painful. At least 8 will go EOL within the next couple years…
There’s way too much copy and paste. The OpenJDK and OpenJFX derivations need deduplicating across versions, Temurin and Semeru are copy‐pasted from each other, the Linux and Darwin derivations of those could probably be deduplicated somewhat… if I end up looking at getting OpenJDK to build on Darwin I might try and do something about the duplication there.
Things done
[ temurin-bin-8 temurin-bin-11 temurin-bin-17 temurin-bin-21 temurin-bin-23 temurin-jre-bin-8 temurin-jre-bin-11 temurin-jre-bin-17 temurin-jre-bin-21 temurin-jre-bin-23 openjdk8 moneydance jabref ] ++ lib.concatMap (jdk: [ jdk (jdk.override { enableJavaFX = true; }) ]) [ zulu8 zulu11 zulu17 zulu21 openjdk11 openjdk17 openjdk21 openjdk23 ]
[ temurin-bin-8 temurin-bin-11 temurin-bin-17 temurin-bin-21 temurin-bin-23 temurin-jre-bin-8 temurin-jre-bin-11 temurin-jre-bin-17 temurin-jre-bin-21 temurin-jre-bin-23 openjdk8 openjdk11 moneydance jabref ] ++ lib.concatMap (jdk: [ jdk (jdk.override { enableJavaFX = true; }) ]) [ zulu8 zulu11 zulu17 zulu21 openjdk17 openjdk21 openjdk23 ]
[ temurin-bin-11 temurin-bin-17 temurin-bin-21 temurin-bin-23 temurin-jre-bin-11 temurin-jre-bin-17 temurin-jre-bin-21 temurin-jre-bin-23 openjdk8 ] ++ lib.concatMap (jdk: [ jdk (jdk.override { enableJavaFX = true; }) ]) [ zulu8 zulu11 zulu17 zulu21 openjdk11 openjdk17 openjdk21 openjdk23 ]
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.