You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Feature Request] Replace Script Engine with Oracle GraalVM to Support Updated Language Standards
Currently, it appears that WPScript still uses an outdated script engine to interpret and execute script files, this might be to maintain compatibility with Java 8. But these engines do not support newer scripting language standards.
Specifically for JavaScript, WP still uses the Nashorn engine, which only supports up to ES5 2009. This limitation prevents script authors from using ES6 and later language features, which is quite troublesome for many programmers familiar with modern JavaScript (even let and import are not supported).
Moreover, the Nashorn engine has been removed in Java 17. Therefore, I suggest migrating the script engine used by WP to the Oracle GraalVM, which is also recommended by Oracle and there are many detailed migration documents. So I think this should be technically feasible to implement.
The text was updated successfully, but these errors were encountered:
WorldPainter used to include GraalVM. The problem was that it was extremely slow; that's why it has been replaced with Nashorn. I'll take another look at GraalVM to see whether the slowness problem has been solved.
[Feature Request] Replace Script Engine with Oracle GraalVM to Support Updated Language Standards
Currently, it appears that WPScript still uses an outdated script engine to interpret and execute script files, this might be to maintain compatibility with Java 8. But these engines do not support newer scripting language standards.
Specifically for
JavaScript
, WP still uses theNashorn
engine, which only supports up toES5 2009
. This limitation prevents script authors from usingES6
and later language features, which is quite troublesome for many programmers familiar with modernJavaScript
(evenlet
andimport
are not supported).Moreover, the
Nashorn
engine has been removed inJava 17
. Therefore, I suggest migrating the script engine used by WP to theOracle GraalVM
, which is also recommended by Oracle and there are many detailed migration documents. So I think this should be technically feasible to implement.The text was updated successfully, but these errors were encountered: