-
Notifications
You must be signed in to change notification settings - Fork 28
Pass the list of files to the JSCompiler #856
Comments
The JS compiler doesn't support incremental compilation yet. Its output is just one big text file in CommonJS format. To support incremental compilation it will have to store the output of each source file in a separate text file, and those will just be temp files that have to be assembled together into the final JS module. This is a major refactoring of the way it works currently. I'll open an issue in ceylon-js. |
@chochos I wonder if it's worth the added complexity, don't you? Although it could probably be done locally, with temp files that get stored alongside the .js files in the repository for example, but that are not "official artifacts" (ie they get ignored by any tool except the JS compiler and won't be copied anywhere). Still, is it worth it? |
The JS compiler seems to me to be a lot faster than the JVM compiler (after all it's "just" generating text). But in a project with hundreds of source files it might save some time if only one JS file is generated and then all of them are stitched together again. The final output however is backwards compatible, so I guess we can leave this for 1.2 because we do have to consider several things:
|
And as @davidfestal has pointed out (elsewhere), it's actually partial compilation we're talking about, not incremental build. |
We don't do this in the JVM compiler actually. We just (re)compile what the user puts on the command line. So if you say NB: If you'd just do |
Yes, true, but since you keep the other classes inside the archive when compiling a single java file (which I call partial module compilation), this allows the IDE to provide true incremental build |
So to summarize :
|
Currently the JSCompiler is called by the IDE without setting the list of files, so that the JSCompiler compiles all the project files, even if they are not changed during an incremental build.
When we add this support, we should care about JS native files that should also trigger an incremental build if any.
The text was updated successfully, but these errors were encountered: