Archi Forum

Archi Plug-ins => jArchi => Topic started by: Phil Beauvoir on November 02, 2022, 09:33:30 AM

Title: Thoughts on removing the Nashorn scripting engine?
Post by: Phil Beauvoir on November 02, 2022, 09:33:30 AM
- The Nashorn script engine is old now and is removed from Java > 15
- Archi ships with Java 11 which includes Nashorn so jArchi can use Nashorn for free
- We ship the GraalVM script engine with jArchi which is far superior
- Archi 5 will be built with and bundled with Java 17 (see https://github.com/archimatetool/archi/issues/867) so no more Nashorn

However there is a stand-alone version of Nashorn that we could bundle with jArchi if required.

But does anyone still use Nashorn given that GraalVM is superior?

Issue tracked here - https://github.com/archimatetool/archi-scripting-plugin/issues/110
Title: Re: Thoughts on removing the Nashorn scripting engine?
Post by: Jean-Baptiste Sarrodie on November 02, 2022, 10:05:02 AM
Hi,

I would suggest to either keep Nashorn bundled for another year (and then printing a "deprecated" message each time a script is run with it), or have it as a separate complementary plugin we can install to enable it.

The reason: not all scripts written for Nashorn work with GraalVM and migrating can take some time.

Regards,

JB
Title: Re: Thoughts on removing the Nashorn scripting engine?
Post by: Phil Beauvoir on November 02, 2022, 10:09:44 AM
> or have it as a separate complementary plugin we can install to enable it.

Yes, that was what I was considering. I've already added some code to jArchi to only show the preferences to choose the script engine if Nashorn is installed, either because using Java 11 or as bundled.
Title: Re: Thoughts on removing the Nashorn scripting engine?
Post by: Phil Beauvoir on November 02, 2022, 14:00:21 PM
> not all scripts written for Nashorn work with GraalVM

The latest version of GraalVM fixes some issues. jArchi 1.3 will have latest version.