-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Replace Nashorn with GraalVM JS Engine #3717
base: main
Are you sure you want to change the base?
Replace Nashorn with GraalVM JS Engine #3717
Conversation
This is an updated version of my previously closed MR on the same topic (#3233). I have updated it to the latest version of GraalVM. Otherwise there is no substantial change. |
@BlasiusSecundus OpenJDK security EOL ends in 3 years |
Alternatively, since the script engine is selected at runtime, if Nashorn engine could not be retrieved (i. e. Conductor runs on a JDK where it is already removed, and not added manually), then automatically create GraalVM engine instead of failing. And perhaps do some logging there which engine was selected ( + update docs to reflect this change in behaviour). |
@BlasiusSecundus I am trying to merge this but the builds are failing - can you run splotlessApply on the code? |
bad5606
to
55da066
Compare
this is required for JDK 15+ compatibility (Nashorn was removed in JDK 15)
55da066
to
6447acd
Compare
I ran spotlessApply, it seems there were indeed some minor things like import ordering. Spotless check should now pass. |
@BlasiusSecundus upon further testing we found that some of the scripts changes the behavior with graalvm. A good example is how maps are accessed with nashorn and graalvm. We have two options:
cc: @c4lm Other than this, the PR looks good. |
If it causes backward compatibility issues, I would certainly not just replace it (as it would be essentially a breaking change). In this case I think that the feature flag approach would be more appropriate. |
As for
This could be easily extended with For Do-While
Therefor introducing GraalVM there (without forcing it) could be more tricky. (Maybe a viable solution would be to introduce the |
how about we introduce a new evaluator type |
Yes, @v1r3n this is what I was also intended to suggest in my last comment. |
This PR is stale, because it has been open for 45 days with no activity. Remove the stale label or comment, or this will be closed in 7 days. |
Do not close. |
Pull Request type
Changes in this PR
Issue #2312 replace Nashorn with GraalVM JS Engine
Nashorn is deprecated in JDK 11 and removed in JDK 15, resulting in runtime errors (and test failures) on JDK 15+