Skip to content
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

Update request: jextract unstable-2024-03-13 → ?? (Something JDK 23 compatible) #354591

Open
msgilligan opened this issue Nov 8, 2024 · 9 comments
Labels
9.needs: package (update) This needs a package to be updated

Comments

@msgilligan
Copy link
Contributor

msgilligan commented Nov 8, 2024

  • Package name: jextract
  • Latest released version: Build 22-jextract+6-47 (2024/9/10)
  • Current version on the unstable channel: unstable-2024-03-13 (JDK 22-based and broken)
  • Current version on the stable/release channel: unstable-2024-03-13

Note that jextract-21 is based on JDK 21 (LTS) and seems to be working.

The current package.nix file for jextract has the lines:

    # Not yet updated for JDK 23
    broken = true;

This means when you try to use it you get errors like this:

error:
      … while calling the 'derivationStrict' builtin
        at <nix/derivation-internal.nix>:34:12:
          33|
          34|   strict = derivationStrict drvAttrs;
            |            ^
          35|

      … while evaluating derivation 'nix-shell'
        whose name attribute is located at /nix/store/sh0v21n9zc03b94qjj4jkkg5mbsjkpzr-source/pkgs/stdenv/generic/make-derivation.nix:336:7

      … while evaluating attribute 'nativeBuildInputs' of derivation 'nix-shell'
        at /nix/store/sh0v21n9zc03b94qjj4jkkg5mbsjkpzr-source/pkgs/stdenv/generic/make-derivation.nix:380:7:
         379|       depsBuildBuild              = elemAt (elemAt dependencies 0) 0;
         380|       nativeBuildInputs           = elemAt (elemAt dependencies 0) 1;
            |       ^
         381|       depsBuildTarget             = elemAt (elemAt dependencies 0) 2;

      (stack trace truncated; use '--show-trace' to show the full, detailed trace)

      error: Package ‘jextract-unstable-2024-03-13’ in /nix/store/sh0v21n9zc03b94qjj4jkkg5mbsjkpzr-source/pkgs/by-name/je/jextract/package.nix:46 is marked as broken, refusing to evaluate.

      a) To temporarily allow broken packages, you can use an environment variable
         for a single invocation of the nix tools.

           $ export NIXPKGS_ALLOW_BROKEN=1

         Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
               then pass `--impure` in order to allow use of environment variables.

      b) For `nixos-rebuild` you can set
        { nixpkgs.config.allowBroken = true; }
      in configuration.nix to override this.

      c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
        { allowBroken = true; }
      to ~/.config/nixpkgs/config.nix.

Given that jdk22 was removed from NixPkgs (I feel that it shouldn't have been, but that's a separate issue) we will need a version of jextract that works with JDK 23. The current early access binary here is Build 22-jextract+6-47 (2024/9/10) so will not work build with JDK 23.

I think the best thing to do would be to take the latest commit on the master branch and try that. We've done this in the past, though I prefer to have the source (roughly) match a supported binary release from OpenJDK.

@SharzyL @SpriteOvO @jlesquembre

@msgilligan msgilligan added the 9.needs: package (update) This needs a package to be updated label Nov 8, 2024
@jlesquembre
Copy link
Member

I tried to update jextract to the latest commit, but it didn't work.

I also think that jdk22 was removed too soon (https://github.com/NixOS/nixpkgs/pull/344544/files#r1835149121)

@msgilligan
Copy link
Contributor Author

In a comment over on PR #344544, @emilazy says:

Edit: It looks like they just released an early access build a few days ago that they claim has Java 23 compatibility. Perhaps a version bump is all it would take now.

She points at this email on the jextract-dev list and she also says:

claims that jextract should basically “just work” with JDK 23. That was unfortunately not my experience.

I think what they mean by "just work" is if you use the JDK 22-based build of jextract it will work with JDK 23, not that you can build the latest commit of jextract with JDK 23.

@msgilligan
Copy link
Contributor Author

I'm pretty busy the next week or two, but when I have time (if nobody else does it first) I will try to get a JDK 23-based build working.

@msgilligan
Copy link
Contributor Author

@emilazy also said:

If you want to try updating jextract to the latest early access build and seeing if it’ll work on JDK 23 that would be great, and please do ping me for review! I can try to help if you run into any issues as well. I didn’t want to mark it as broken here but making sure we had the latest supported JDK and weren’t at risk of shipping an EOL one in 24.11 took priority. If we could get it fixed before the 24.11 release I’d be very happy.

Thanks!

When would I need to have a PR ready to make the 24.11 cutoff? (My downstream project will be tracking unstable because I want the latest libsecp256k1 which hasn't shown up in Nixpkgs yet)

@emilazy
Copy link
Member

emilazy commented Nov 11, 2024

It shouldn’t cause any mass rebuilds, so any time before the end of the month should be safe to make the final release. But as the package is currently broken, any update that fixes it would also be considered backwards‐compatible after release as well, so “until June” is also a valid answer :)

@msgilligan
Copy link
Contributor Author

msgilligan commented Nov 11, 2024

(Looks like I got rate-limited or something over on the other thread 🤦‍♂️)

@msgilligan
Copy link
Contributor Author

@jlesquembre Will you have time to give it another try before I do?

@jlesquembre
Copy link
Member

@msgilligan I don't think so, I'm quite busy until the end of the year.
As mentioned in another thread, you could use an older version of Nixpkgs in the meantime.: https://lazamar.co.uk/nix-versions/?package=openjdk&version=22.0.1-ga&fullName=openjdk-22.0.1-ga&keyName=jdk22&revision=47c1824c261a343a6acca36d168a0a86f0e66292&channel=nixos-unstable#instructions

@msgilligan
Copy link
Contributor Author

msgilligan commented Nov 11, 2024

@msgilligan I don't think so, I'm quite busy until the end of the year. As mentioned in another thread, you could use an older version of Nixpkgs in the meantime.: https://lazamar.co.uk/nix-versions/?package=openjdk&version=22.0.1-ga&fullName=openjdk-22.0.1-ga&keyName=jdk22&revision=47c1824c261a343a6acca36d168a0a86f0e66292&channel=nixos-unstable#instructions

OK, cool. I'll have time before then. I'm moving forward to JDK 23 and the latest jextract

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.needs: package (update) This needs a package to be updated
Projects
None yet
Development

No branches or pull requests

3 participants