-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Rhino/Nashorn #316
Comments
So Nashorn doesn't include any facility to load CommonJS modules. I tried using this one https://github.com/micmath/Rhino-Require but it seems nashorn can't load large modules; it throws an exception trying to load the language module. |
Nashorn can't parse the language module model (a JSON object in one 356KB-long line). Rhino didn't have a problem with this. |
You say "line", is it able to read the language module of it's separated into several shorter lines? Other ways of splitting it up perhaps? |
Yeah if you split it into several lines then it works. But then reading it in the compiler and runner becomes more complicated. And splitting it also becomes complicated. All just so that nashorn's shitty parser can read it. Rhino didn't have this problem, and neither does node or any browser we've tested. |
I'm guessing you didn't test IE6 then ;-) |
To be able to run on Rhino and/or Nashorn, the native code needs some changes:
process
,runtime
andsystem
need to be aware of these VM's (find out somehow that the VM being used is Rhino/Nashorn, not node or browser)print
and thewrite
/writeLine
/etc methods need to use Rhino'sprint
function (and also support whatever Nashorn uses)The text was updated successfully, but these errors were encountered: