-
Notifications
You must be signed in to change notification settings - Fork 2
JS version: create appropriate project directories; modify build script, etc #61
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
Comments
Suppose there is a variable that describes the runtime system; could the JVM then have some code like:
with both Or is the |
That's approximately how ScalaJS works. The compiler does two separate compilations for JS and JVM. It is possible to specify separate sources for each of these compilations by putting them into separate directories. You can get an idea by looking at this demo. Notice how it has projects for JS, JVM and the one shared between them. Currently that's not the problem though. I was able to compile the SubScript code base under JS (with no separate JVM files, no idea why it compiled with |
Thanks; so we can have one or a few more source files in two target-dependent versions.
That may well explain why |
In particular, java dependencies in the VM need to be isolated:
Like the
SwingCodeExecutorAdapter
is now in thesubscript.swing
package, thesejava
dependencies may go to packagesubscript.jvm
. For the JS version, we may use a packagesubscript.js
, which should have stubs for synchronized and for the executor thatThreadedCodeFragment
uses.How will the appropriate class from either of these packages be loaded at run time? The run time should know whether it runs on JVM, JS or maybe something else. How exactly is to yet be found out.
The text was updated successfully, but these errors were encountered: