Skip to content
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

Sitelet prod bundling STEP 2 #1372

Open
Jand42 opened this issue Jan 8, 2024 · 0 comments
Open

Sitelet prod bundling STEP 2 #1372

Jand42 opened this issue Jan 8, 2024 · 0 comments

Comments

@Jand42
Copy link
Member

Jand42 commented Jan 8, 2024

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 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.

@Jand42 Jand42 changed the title Sitelet PROD bundling STEP 2 Sitelet prod bundling STEP 2 Jan 8, 2024
Jand42 added a commit that referenced this issue Mar 21, 2024
* #1372 WIP finding Content.Page/Bundle calls

* cleanup and refactor

* WIP metadata

* compiler updated

* Web tests compiling, needs fixing

* test

* fixes

* more fixes

* yet more fixes
Jand42 added a commit that referenced this issue Mar 22, 2024
Jand42 added a commit that referenced this issue Apr 15, 2024
Jand42 added a commit that referenced this issue Apr 16, 2024
Jand42 added a commit that referenced this issue Apr 23, 2024
Jand42 added a commit that referenced this issue May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant