I am using Java daily on nixos and darwin targets, and so far I found the support to be really good.
I don’t have commit access, but I have been looking for meaningful ways to contribute back to the community. Happy to help with code reviews and testing (especially on aarch64 darwin) if needed. I’d also be happy to work on PRs if I manage to get up to speed.
As the author of the big bump PR that seems to have kicked all of this off, I’m glad to see people excited to discuss it! As mentioned, please take a look at the PRs linked in the umbrella issue! The big bump, which should address a lot of the outdated packages, has been ready to merge for quite a while now, and I hope it gets merged sometime in the next 3 months.
Once I get a bit more time, I’ll try and put down my thoughts on the various sub-issues linked in the umbrella issue.
I think we should add a --version test in an installCheckPhase or something like that
testers.testVersion?
There is no updateScript for JDK derivations.
I do not believe this is “possible”, since not every Java program builds on all JDK.
Also, we have a much more serious problem in my modest opinion: Java bootstrap depends on open source abandonware.
I do not know how much Nixpkgs care about bootstrappability, but I believe this is far from a serious priority.
I am a maintainer of two such packages: jquake and protege-distribution.
While the first one is a proprietary application, I packaged the second like that because, at the time, I couldn’t figure out a way of building complex Maven applications with an acceptable level of maintenance burden on the Nixpkgs side of things.
If we manage to get a good solution for Maven, then maybe I could deprecate that package in favor of a source-built one.
As the maintainer of maptool, I would also be very happy to move to a source-built package if there was a better story for managing Gradle dependencies.
The difference, is that installCheckPhase makes the build fail if --version | grep ${version} fails, whereas testers.testVersion is not being run by nixpkgs-review.
I’d also encourage you to add a some kind of an installCheckPhase for the proprietary package, so we’ll be able to know via nixpkgs-review if it gets broken without running it ourselves.
Even with that PR, or something alike merged, people won’t get used to add the --tests flag to their nixpkgs-review runs, so you might still be missing breakages. I don’t understand this insistence on passthru.tests.testVersion where an installCheckPhase is a much stronger and simpler compliance that a package can fulfill.
Thanks for quoting Nixpkgs’ manual . This was discussed a bit at #119731 but people gave their attention in the discussions there on topics other then this. Someone there did raise my opinion, but nobody commented on this opinion…
I noted myself to discuss this at Nixpkgs at some point when I’ll have time.
An aside from folks sorta getting their feet wet (the toes went first) with Java - what JDK is ideal for nixpkgs work? Does it even matter? Please feel free to DM me as to not derail overall thread. Many thanks and this feels great. @doronbehar hope you are well!
CI doesn’t run nixpkgs-review automatically, and I don’t think ofborg maintainers will want to make it run it. Also users don’t do it for every PR they review, so I’m not sure what kind of automation you can use here. I agree though that perhaps if you run a nixpkgs-review, it should run the tests unconditionally, perhaps even without adding a --tests flag, or perhaps only add a --no-tests flag. In anycase, I wouldn’t call that automation, since running nixpkgs-review is not automated.
Yes but I was talking about passthru.tests of packages that depend on a change of a PR, and are not affected directly by it. Ofborg doesn’t run passthru.tests for these packages, and it doesn’t even build them. And even if you @ofborg build them it won’t run these tests. They are way too hidden.
That’s sound like a much greater effort in comparison to convincing people that the docs should recommend putting a --version test in the installCheckPhase and add that phase to the Java packages that are made up by a prefetched jar file.