You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
[@chochos] In relation to eclipse-archived/ceylon-ide-eclipse#856 the JS compiler should support partial compilation. This changes the way the generated JS is handled; right now it's directly written to the final CommonJS file, but this change would mean something like this:
Every source file will be compiled to a corresponding intermediate JS file
All these JS files are assembled into the final CommonJS module.
This will allow the user to recompile just 1 file and reassemble the entire module.
Some considerations:
Are these intermediate JS files considered only temporary, or are they official artifacts of the module?
In any case, where to store them?
Will they always be assembled together in the same order?
The compiler needs to determine what JS files to assemble together. If a source file has been removed, its resulting JS file must not be included in the JS module. This is probably easy to accomplish in the IDE, but it needs to work in CLI as well.
Are these intermediate JS files considered only temporary, or are they official artifacts of the module?
Personally I'd say to make them only temporary because I'm not sure it's worth to have all the added complexity just so your first compilation is faster.
In any case, where to store them?
Probably easiest alongside the .JS file in the repository, but that would mean that it probably won't work if you compile directly to a remote repository. We could also just have a local "build" folder or something. Not sure.
Will they always be assembled together in the same order?
I'd say "yes, definitely"
(order of declarations in the original .ceylon file perhaps?)
If a source file has been removed, its resulting JS file must not be included in the JS module.
I'm not sure this is necessary, or even possible, we don't do this in the JVM compiler either, the idea being that if you want a clean build you clean the repository first. You could be doing several compilations that get their sources from different folders, so there would be no way to detect if a file was deleted.
[@davidfestal] We do some cleaning of this sort in the IDE because we can detect that a project file was removed between 2 incremental builds.
So if we have access to the JS intermediary files, we could be able to remove the temp file corresponding to a removed ceylon and regenerate the global commonJS file the same way as we currently clean CAR archives.
Why not.
But even in the IDE, the best way to ensure your generated archives are fully clean is still to do a clean build.
Sure, the CLI compiler can do things the IDE will never allow, which is perfectly okay. It's even desirable that the IDE does a bit more work in this case.
[@chochos] In relation to eclipse-archived/ceylon-ide-eclipse#856 the JS compiler should support partial compilation. This changes the way the generated JS is handled; right now it's directly written to the final CommonJS file, but this change would mean something like this:
This will allow the user to recompile just 1 file and reassemble the entire module.
Some considerations:
[Migrated from ceylon/ceylon-js#408]
The text was updated successfully, but these errors were encountered: