xp
xp copied to clipboard
Support Nashorn and GraalJS
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
After https://github.com/enonic/xp/issues/9236 we are one step closer, but applications have to use XP 7.8 libs
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/
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 can this be closed now?
No. Still a lot of work need to be done in our libs and apps so they work on Nashorn and Graaljs
Now when we have individual tasks - we can close this issue.