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

graalvm-ce: 22.3.1 -> 21.0.0 #257433

Merged
merged 16 commits into from
Sep 29, 2023
Merged

graalvm-ce: 22.3.1 -> 21.0.0 #257433

merged 16 commits into from
Sep 29, 2023

Conversation

thiagokokada
Copy link
Contributor

@thiagokokada thiagokokada commented Sep 26, 2023

Description of changes

This initially may look like a downgrade, but this is caused by how upstream is tagging versions.

Before they would have the GraalVM having its own version (e.g. 22.3.1), and each version would support multiple JVM versions (e.g. 11, 17, 19). Now each release supports only one JVM version (e.g.: 21), and they track the same version as the JVM.

They also changed packaging, making all sub-products (e.g.: GraalPy, GraalRuby, etc.) standalone, so they do not depend in GraalVM anymore and have their own version. Thanks to this change, we will need to repackage everything.

Fix: #257292

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

"graalpy" = {
"aarch64-linux" = {
sha256 = "0n0zz86h7jsqgdiyj6vj7qw57ny40jpmfvylyxq70riy86a4zp67";
url = "https://github.com/oracle/graalpython/releases/download/graal-23.1.0/graalpy-community-23.1.0-linux-aarch64.tar.gz";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using the non-JVM variants here, e.g.: graalpy-community-jvm. Those versions includes the libraries to interface with JVM, that I imagine enables usage of mixed languages with interop (https://www.graalvm.org/latest/reference-manual/js/JavaInteroperability/).

Not sure who is using this though, and this complicates the packaging, so for now I am going to package the standalone versions instead, and if there is someone that needs those libraries please open an issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit late to this, but I thought I would add:

For Truffle polyglot projects, if I was going to write one, I would be using something like mvn2nix and I think I would be able to fetch everything necessary from Maven instead of needing them in nixpkgs.

(So, packaging only the standalone versions seems fine.)

@thiagokokada
Copy link
Contributor Author

Result of nixpkgs-review pr 257433 run on x86_64-linux 1

16 packages built:
  • babashka
  • babashka-unwrapped
  • bbin
  • clj-kondo
  • clojure-lsp
  • dapl-native
  • dbqn-native
  • graalvm-ce
  • graalvmCEPackages.graaljs
  • graalvmCEPackages.graalnodejs
  • graalvmCEPackages.graalpy
  • graalvmCEPackages.truffleruby
  • jet
  • neil
  • vscode-extensions.betterthantomorrow.calva
  • zprint

@thiagokokada thiagokokada marked this pull request as ready for review September 26, 2023 18:37
@thiagokokada

This comment was marked as outdated.

@thiagokokada

This comment was marked as outdated.

This initially may look like a downgrade, but this is caused by how
upstream is tagging versions.

Before they would have the GraalVM having its own version (e.g. 22.3.1),
and each version would support multiple JVM versions (e.g. 11, 17, 19).
Now each release supports only one JVM version (e.g.: 21), and they
track the same version as the JVM.

They also changed packaging, making all sub-products (e.g.: GraalPy,
GraalRuby, etc.) standalone, so they do not depend in GraalVM anymore
and have their own version. Thanks to this change, we will need to
repackage everything.

To simplify, this commit will remove all sub-products and only care
about the GraalVM/Native Image (that is back to GraalVM itself) part.
Other commits will re-added each sub-product.

Fix (partial): #257292
@thiagokokada

This comment was marked as outdated.

@thiagokokada

This comment was marked as outdated.

@thiagokokada

This comment was marked as outdated.

@thiagokokada
Copy link
Contributor Author

@ofborg build babashka babashka-unwrapped bbin clj-kondo clojure-lsp dapl-native dbqn-native graalvm-ce graalvmCEPackages.graaljs graalvmCEPackages.graalnodejs graalvmCEPackages.graalpy graalvmCEPackages.truffleruby jet neil vscode-extensions.betterthantomorrow.calva zprint

Finally fix the remaining issues in macOS thanks to the help of @reckenrode. This PR should be ready for review/merge now.

@thiagokokada
Copy link
Contributor Author

Can I get a re-review @ericdallo ?

Also pinging @glittershark @jlesquembre @DerGuteMoritz @bennyandresen @babariviere @hlolli for review.

@DerGuteMoritz
Copy link
Contributor

@thiagokokada I'm afraid I'm not familiar enough with graalvm itself to meaningfully review your changes. But I totally would like to commend your effort, thanks a lot!! 🥳

@@ -155,6 +155,10 @@

- PHP now defaults to PHP 8.2, updated from 8.1.

- GraalVM has been updated to the latest version, and this brings significant changes. Upstream don't release multiple versions targeting different JVMs anymore, so now we only have one GraalVM derivation (`graalvm-ce`). While at first glance the version may seem a downgrade (22.3.1 -> 21.0.0), the major version is now following the JVM it targets (so this latest version targets JVM 21). Also some products like `llvm-installable-svm` and `native-image-svm` were incorporate to the main GraalVM derivation, so they're included by default.

- GraalPy (`graalCEPackages.graalpy`), TruffleRuby (`graalCEPackages.truffleruby`), GraalJS (`graalCEPackages.graaljs`) and GraalNodeJS (`grallCEPackages.graalnodejs`) are now indepedent from the main GraalVM derivation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

graalCEPackagesgraalvmCEPackages

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/how-do-i-migrate-this-expression-to-nixos-23-11/36314/1

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/how-do-i-migrate-this-expression-to-nixos-23-11/36314/2

@rafaelrc7
Copy link
Member

rafaelrc7 commented Jul 20, 2024

@thiagokokada Sorry for the pinging on an old PR, but I don't know if this was supposed to be an issue...

This PR removed specific versions of graalvm (graalvm17-ce for example) and it says that "upstream dropped support to different JDK versions for each GraalVM release". However, this does not seem to be the case. The release calendar (https://www.graalvm.org/release-calendar/) for instance states that graalvm17 and graalvm21 will be updated at least until 2026 and the download page (https://www.graalvm.org/downloads/) lets you download the JDK 17, 21 and 22 versions. Did I misunderstand this?

I'm also asking about this, because I am trying to package pkl (#286658), we recently managed to fix the gradle build. However, this package also supports a native build using graalvm, that is much faster. However, it depends specifically on graalvm17. Because of the removal of graalvm17 I am not being able to build the native image through nixpkgs. Assuming I did not misunderstand anything, would it be possible to readd the still supported past graalvm versions? (currenty jdk 17 and 21)

@thiagokokada
Copy link
Contributor Author

@thiagokokada Sorry for the pinging on an old PR, but I don't know if this was supposed to be an issue...

This PR removed specific versions of graalvm (graalvm17-ce for example) and it says that "upstream dropped support to different JDK versions for each GraalVM release". However, this does not seem to be the case. The release calendar (https://www.graalvm.org/release-calendar/) for instance states that graalvm17 and graalvm21 will be updated at least until 2026 and the download page (https://www.graalvm.org/downloads/) lets you download the JDK 17, 21 and 22 versions. Did I misunderstand this?

I'm also asking about this, because I am trying to package pkl (#286658), we recently managed to fix the gradle build. However, this package also supports a native build using graalvm, that is much faster. However, it depends specifically on graalvm17. Because of the removal of graalvm17 I am not being able to build the native image through nixpkgs. Assuming I did not misunderstand anything, would it be possible to readd the still supported past graalvm versions? (currenty jdk 17 and 21)

Yes, you misunderstood this. Oracle GraalVM is still supported for LTS versions, but GraalVM Community Edition is only supported in one major JVM version. You can take a look at the link you sent that shows a table comparing Oracle vs Community Edition versions.

Also, AFAIK we can't distribute binaries built with Oracle GraalVM, since the license is proprietary. We can still add them as proprietary, but the resulting binaries will not be built in Hydra.

BTW, I have zero interest in adding support for Oracle GraalVM, but if someone wants to do so it is fine, I can review it.

@rafaelrc7
Copy link
Member

Yes, you misunderstood this. Oracle GraalVM is still supported for LTS versions, but GraalVM Community Edition is only supported in one major JVM version.

Ah, I understand it now, thanks for the explanation!

BTW, I have zero interest in adding support for Oracle GraalVM, but if someone wants to do so it is fine, I can review it.

It seems someone is working on it (#321026)

Thanks for the answers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update request: graalvm-ce 22.3.1 -> jdk-21.0.0
9 participants