oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.35k stars 1.63k forks source link

Provide graaljs that's useable across JDK versions 11 through 22 by backporting #7510 #9511

Open mk opened 2 months ago

mk commented 2 months ago

Feature request

Is your feature request related to a problem? Please describe. We've been using org.graalvm.js/js 21.3.2.1 in http://github.com/nextjournal/markdown for use in http://github.com/nextjournal/clerk. We've used graaljs to leverage markdown-it as a markdown parser.

`21.3.2.1. does not yet contain #7510, so it crashes on JDK 22 as reported in https://github.com/nextjournal/clerk/issues/642 and https://github.com/nextjournal/markdown/issues/23.

Upgrading to a later version would in turn break compatibility with JDK 11, which is still heavily used in the Clojure community (last year's state of Clojure survey still saw JDK 8 at 21% and JDK 11 at 47% respectively).

Describe the solution you'd like. We would like to be able to depend on a org.graalvm.js/js library that works across JDK 11 to 22. One potential solution discussed with @chumer on slack is back porting #7510 to 21.3.

Describe who do you think will benefit the most. Library authors. A version of org.graalvm.js/js that is usable across a wider range of JDK versions still in use today enables polyglot use cases in libraries where there's no control over the JDK version used and enterprise users are slow to adopt newer versions, especially in the Clojure community with its focus on backwards-compatibility.

Describe alternatives you've considered. We evaluating moving away from using org.graalvm.js/js and switch our implementation to a Java-based one. Since markdown is not well specified, this is a substaintial task and we lose the ability to rely on the same implementation in browsers as well as on the JDK.

Additional context.

Express whether you'd like to help contributing this feature Happy to help with testing.

chumer commented 2 months ago

I agree we should backport 23.1 to 21.3 to make it possible to run on JDK 22.