Goal is to be able to create multiple bundles for Sitelets prod mode. There is a compile-time and runtime component to this.
Compile-time: the contents of each bundle need to be evaluated. Content.Page will get a new optional parameter Bundle: string that can specify a bundle name, and the compiler will recognize Web.Controls created withing the Content.Page expression. However, there will be no deep traversal of server-side logic, any controls created outside of the scope of the Content.Page expression need to be marked with a new function (e.g. Content.Bundle) that does nothing at runtime (has signatures string * 'x -> 'x and string seq * 'x -> 'x) but allows sending more stuff to go into a bundle or bundles. An additional bundle with all controls and quoted functions used will be created as a fallback. If no explicit bundling is done by the user, only this fallback single bundle will be created, as right now.
Runtime: The new parameter on Content.Page will also set at runtime the bundle name to be used. When writing the startup code for the page, all controls/functions imported are now attempted to be taken from the given bundle. If any required function/class is missing, the fallback full bundle will be used instead. This guarantees that the page always works, but leaves optimization for the user when there are any dynamic instantiation or other non-statically explorable code involved.
Follow-up to #1361
Goal is to be able to create multiple bundles for Sitelets prod mode. There is a compile-time and runtime component to this.
Compile-time: the contents of each bundle need to be evaluated.
Content.Page
will get a new optional parameterBundle: string
that can specify a bundle name, and the compiler will recognize Web.Controls created withing theContent.Page
expression. However, there will be no deep traversal of server-side logic, any controls created outside of the scope of theContent.Page
expression need to be marked with a new function (e.g.Content.Bundle
) that does nothing at runtime (has signaturesstring * 'x -> 'x
andstring seq * 'x -> 'x
) but allows sending more stuff to go into a bundle or bundles. An additional bundle with all controls and quoted functions used will be created as a fallback. If no explicit bundling is done by the user, only this fallback single bundle will be created, as right now.Runtime: The new parameter on
Content.Page
will also set at runtime the bundle name to be used. When writing the startup code for the page, all controls/functions imported are now attempted to be taken from the given bundle. If any required function/class is missing, the fallback full bundle will be used instead. This guarantees that the page always works, but leaves optimization for the user when there are any dynamic instantiation or other non-statically explorable code involved.