xp icon indicating copy to clipboard operation
xp copied to clipboard

Support Nashorn and GraalJS

Open anatol-sialitski opened this issue 3 years ago • 5 comments

It would be nice to switch between GraalJS and Nashorn implementations in XP 8 so applications written for XP 7 would run on XP 8 with minimal to no changes

There are a few bumpers

  • [ ] bundle Nashorn into XP (it is removed from Java 15) ?
  • [x] core libs don't work with GraalJS (especially when nashorn-compat is disabled)
  • [ ] extra libs (like lib-menu, etc...) don't work on GraalJS

anatol-sialitski avatar Jun 21 '21 13:06 anatol-sialitski

After https://github.com/enonic/xp/issues/9236 we are one step closer, but applications have to use XP 7.8 libs

rymsha avatar Nov 24 '21 14:11 rymsha

We may still consider NOT supporting Nashorn as it may be too complicated, and GraalJS nashorn-compat covers many (but not all) cases https://www.graalvm.org/reference-manual/js/NashornMigrationGuide/

rymsha avatar Nov 24 '21 14:11 rymsha

In PoC it is possible to choos between Nashorn and GraalJS. But Nashorn can run only on Java 11 xp.scriptEngine=Nashorn switches to Nashorn.

rymsha avatar Jan 17 '22 16:01 rymsha

@rymsha can this be closed now?

alansemenov avatar Jun 14 '22 07:06 alansemenov

No. Still a lot of work need to be done in our libs and apps so they work on Nashorn and Graaljs

rymsha avatar Jun 14 '22 09:06 rymsha

Now when we have individual tasks - we can close this issue.

rymsha avatar Sep 13 '22 20:09 rymsha