Conversation
|
Now that we have shape files, we have the option to use shape info from other cmo.js, like it's done with cmx. Should we support that, if yes, should it be under a config of some sort ? I would expect that generated code is less optimized with this PR because I think jsoo propagate shapes between compilation units when compiling a cma to js. |
From what I can see, this is already implemented. We are passing the appropriate dependencies to |
Cool, then the question is, do we want this to be the only way to do separate compilation or should we support a "faster" mode where we don't have these X-module deps ? Do we get identical cma.js with this PR or are we missing some information from shapes ? |
Refactor jsoo archive generation to use a demand-driven approach. Previously, rules for all configuration variants were generated upfront whenever a library was built. This logic is now decoupled from general library rules; instead, the build system intercepts requests for specific configuration directories and generates the necessary rules dynamically. This will enable the following improvements: - The config details can be moved out of dune into jsoo (#13613). - This will make it possible to implement a more incremental build process without generating a large volume of unused rules for unrequested configurations (#13612). Signed-off-by: Jérôme Vouillon <jerome.vouillon@gmail.com>
Signed-off-by: Hugo Heuzard <hugo.heuzard@gmail.com> Signed-off-by: Jérôme Vouillon <jerome.vouillon@gmail.com>
8d7799a to
419d431
Compare
|
I think we should get the same information from shapes with this PR. Shapes introduce a dependency between cmos. So, indeed, there could be a faster mode where cmos only depend on cmis. I'm not sure this is worth it, though. |
Maybe we should try to bench compiation of libraries with this branch. Large and small libs. Fresh build and incremental ones. |
Move #7389 on top of #13611.
Instead of compiling *.cma files to JavaScript. We can compile individual *.cmos to javascript and link all *.cmo.js together.
This results in a much better incremental build as jsoo no longer recompile compilation units that were not modified.
Linking *.cmo.js into a cma.js should be much faster than any compilation with jsoo.
This can only be done for local libraries as "installed" ones are not required to provide individual cmo. This is fine.