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

[FEATURE] bundle/Builder: Support async require sections and conditional core boot #1020

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented May 17, 2024

The builder is able to create bundles not containing "sap.ui.requireSync" calls, so that the bundles can be used also within UI5 Version 2 and later, where this internal API is not available anymore.

JIRA: CPOUI5FOUNDATION-789

@RandomByte RandomByte changed the title [FEATURE] bundle/Builder: Support async require sections [FEATURE] bundle/Builder: Support async require sections and conditional core boot May 17, 2024
@flovogt flovogt force-pushed the bundle-async-require-section-cond-boot branch 4 times, most recently from 0314e80 to 74ff4ab Compare May 28, 2024 13:07
@coveralls
Copy link

coveralls commented May 28, 2024

Coverage Status

coverage: 94.663% (+0.02%) from 94.643%
when pulling 5adecf8 on bundle-async-require-section-cond-boot
into 1cdae55 on main.

@flovogt flovogt self-assigned this May 28, 2024
@flovogt flovogt force-pushed the bundle-async-require-section-cond-boot branch 4 times, most recently from af1d63a to a673874 Compare May 31, 2024 08:22
@flovogt flovogt marked this pull request as ready for review May 31, 2024 08:24
@flovogt flovogt removed their assignment May 31, 2024
@flovogt flovogt self-requested a review May 31, 2024 08:36
@RandomByte RandomByte requested a review from codeworrior May 31, 2024 10:37
@RandomByte
Copy link
Member Author

LGTM, but would be great if @codeworrior could take a brief look at the LBT changes

@flovogt flovogt force-pushed the bundle-async-require-section-cond-boot branch from 11ea0fe to e2168a9 Compare May 31, 2024 10:51
Copy link
Member

@codeworrior codeworrior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generateStandaloneAppBundle does not provide the UI5 version to the bundler, I guess because the config should be under our control. But in the intermediate state of this Pr, this might cause the generation of a self-contained bundle for UI5 2.0 with a sync require. Just mentioning it.

@RandomByte
Copy link
Member Author

The generateStandaloneAppBundle does not provide the UI5 version to the bundler, I guess because the config should be under our control. But in the intermediate state of this Pr, this might cause the generation of a self-contained bundle for UI5 2.0 with a sync require. Just mentioning it.

The UI5 version does not determine whether a sync- or async require is generated. This is rather define by the bundle configuration. Currently, the self-contained build does not explicitly set async: false for the require section, leading to an async require:

bundleDefinition.sections.push({
mode: "require",
filters: [
"sap/ui/core/Core.js"
]
});

@flovogt flovogt force-pushed the bundle-async-require-section-cond-boot branch 3 times, most recently from 99432ce to 6778414 Compare June 7, 2024 11:15
Copy link
Member Author

@RandomByte RandomByte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (I can't approve)

@flovogt flovogt requested review from codeworrior and matz3 June 7, 2024 12:13
Copy link
Member

@matz3 matz3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version needs to be also passed in generateStandaloneAppBundle task

@flovogt flovogt force-pushed the bundle-async-require-section-cond-boot branch 2 times, most recently from 5ee5d4a to 52d8a5a Compare June 12, 2024 08:15
@flovogt
Copy link
Member

flovogt commented Jun 12, 2024

Version needs to be also passed in generateStandaloneAppBundle task

Done

@flovogt flovogt force-pushed the bundle-async-require-section-cond-boot branch from 52d8a5a to 5979b49 Compare June 12, 2024 13:35
…nal core boot

The builder is able to create bundles not containing "sap.ui.requireSync" calls, so that the bundles can be used also within UI5 Version 2 and later, where this internal API is not available anymore.

JIRA: CPOUI5FOUNDATION-789

Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
@flovogt flovogt force-pushed the bundle-async-require-section-cond-boot branch from 5979b49 to 5adecf8 Compare June 12, 2024 14:14
@flovogt flovogt merged commit e421e2f into main Jun 12, 2024
17 checks passed
@flovogt flovogt deleted the bundle-async-require-section-cond-boot branch June 12, 2024 14:59
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

Successfully merging this pull request may close these issues.

5 participants