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

Bump Graal js language to support Java 22 #24

Closed
wants to merge 2 commits into from
Closed

Bump Graal js language to support Java 22 #24

wants to merge 2 commits into from

Conversation

zampino
Copy link
Collaborator

@zampino zampino commented Apr 2, 2024

Specifically with truffle api library dropping sun.misc.Unsafe which is no longer present in Java 22:

Closes #23.

🚧 This will probably not be merged, as we'd lose support of Java 11. We're trying to drop Graal polyglot (#25) for the clj side of things.

specifically with truffle api library dropping sun.misc.Unsafe which is no longer present in Java 22.
See also
* oracle/graal#7510
* https://bugs.openjdk.org/browse/JDK-8316160
@zampino zampino changed the title Bump graal js language to support Java 22 Bump Graal js language to support Java 22 Apr 2, 2024
@zampino
Copy link
Collaborator Author

zampino commented Apr 2, 2024

With the latest graal truffle we get support for Java 22, but we need at least Java 17, CI is on Java 11 and throws

Syntax error (UnsupportedClassVersionError) compiling at (nextjournal/markdown.clj:1:1).
org/graalvm/polyglot/Context has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

@zampino zampino marked this pull request as draft June 6, 2024 09:01
@zampino zampino mentioned this pull request Jun 6, 2024
@AndreaCrotti
Copy link

Weirdly enough I get this error when I run tests, but my colleagues don't with the same version of JDK (temurin11).
I tried multiple versions but always the same, and even more weirdly if I start the repl and run the tests in the repl it all works fine.

But more importantly, why does this library even depend on graalvm? Is that necessary for just using it for Clojure?
I tried to exclude all the JS dependencies since I don't need it for clojurescript but it blows up if I do that.

@zampino
Copy link
Collaborator Author

zampino commented Jun 11, 2024

why does this library even depend on graalvm? Is that necessary for just using it for Clojure?

Yes, it is. Strictly speaking, we're not depending on GraalVM, but we're using the graal polyglot library to call the markdown-it tokenizer on the JVM (GraalVM or any else), this guarantees the same behaviour on both clj/s sides. We're probably dropping this approach in #25.

@AndreaCrotti
Copy link

Ah nice good to know it might not be needed anymore soon, thanks

@zampino
Copy link
Collaborator Author

zampino commented Sep 24, 2024

Obsolete since #28.

@zampino zampino closed this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doesn't support Java 22
2 participants