Thoughts on removing the Nashorn scripting engine?

Started by Phil Beauvoir, November 02, 2022, 09:33:30 AM

Previous topic - Next topic

Phil Beauvoir

- 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
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Jean-Baptiste Sarrodie

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
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

> 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.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

> not all scripts written for Nashorn work with GraalVM

The latest version of GraalVM fixes some issues. jArchi 1.3 will have latest version.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.