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] depCache bundling mode #951

Merged
merged 30 commits into from
Dec 6, 2023
Merged

[FEATURE] depCache bundling mode #951

merged 30 commits into from
Dec 6, 2023

Conversation

d3xter666
Copy link
Contributor

@d3xter666 d3xter666 commented Nov 1, 2023

JIRA: CPOUI5FOUNDATION-744

Dependency cache information that lists modules and their dependencies of all types: JS, declarative views/fragments.
Only the dependencies of the modules are stored as 'depCache' configuration.

@d3xter666 d3xter666 marked this pull request as draft November 1, 2023 12:21
@coveralls
Copy link

coveralls commented Nov 3, 2023

Coverage Status

coverage: 94.523% (+0.06%) from 94.461%
when pulling f66676f on new-depCache-bundle
into 6565127 on main.

@d3xter666 d3xter666 marked this pull request as ready for review November 6, 2023 07:29
@d3xter666 d3xter666 requested a review from a team November 6, 2023 07:30
@d3xter666 d3xter666 force-pushed the new-depCache-bundle branch from 3ee7ab6 to e3d4615 Compare November 6, 2023 08:05
lib/lbt/bundle/Builder.js Outdated Show resolved Hide resolved
lib/lbt/bundle/Builder.js Outdated Show resolved Hide resolved
test/lib/lbt/bundle/Builder.js Show resolved Hide resolved
lib/lbt/bundle/BundleDefinition.js Outdated Show resolved Hide resolved
lib/lbt/bundle/BundleDefinition.js Show resolved Hide resolved
lib/lbt/bundle/Builder.js Show resolved Hide resolved
Co-authored-by: Matthias Oßwald <mat.osswald@sap.com>
@d3xter666 d3xter666 requested a review from matz3 November 15, 2023 13:11
test/lib/lbt/bundle/Builder.js Show resolved Hide resolved
lib/lbt/bundle/Builder.js Outdated Show resolved Hide resolved
lib/lbt/bundle/AutoSplitter.js Outdated Show resolved Hide resolved
lib/lbt/bundle/AutoSplitter.js Outdated Show resolved Hide resolved
test/lib/lbt/bundle/Builder.js Show resolved Hide resolved
Copy link
Member

@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

d3xter666 added a commit to SAP/ui5-project that referenced this pull request Dec 1, 2023
This change provide a `ui5.yaml` schema definition for the following
feature: SAP/ui5-builder#951

JIRA: CPOUI5FOUNDATION-744
matz3
matz3 previously requested changes Dec 1, 2023
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.

The depCache is currently broken when using the AutoSplitter (numberOfParts > 1).
This can be easily reproduced within openui5-sample-app:

builder:
  bundles:
    - bundleDefinition:
        name: depCache-test-bundle.js
        sections:
          - filters:
              - "sap/ui/demo/todo/"
              - "sap/ui/demo/todo/manifest.json"
            mode: depCache
      bundleOptions:
        numberOfParts: 2

The bundle then not only contains the modules from the filters (expected), but also dependencies of those modules (outside of the project), although resolve should default to false.

0ecfd7d (Enable auto split for depCache) is the commit which broke that behaviour.

A smaller issue is that the part sizes differ a lot (5kb vs 9kb).

@d3xter666 d3xter666 requested a review from matz3 December 4, 2023 07:28
@d3xter666
Copy link
Contributor Author

The depCache is currently broken when using the AutoSplitter (numberOfParts > 1). This can be easily reproduced within openui5-sample-app:

builder:
  bundles:
    - bundleDefinition:
        name: depCache-test-bundle.js
        sections:
          - filters:
              - "sap/ui/demo/todo/"
              - "sap/ui/demo/todo/manifest.json"
            mode: depCache
      bundleOptions:
        numberOfParts: 2

The bundle then not only contains the modules from the filters (expected), but also dependencies of those modules (outside of the project), although resolve should default to false.

0ecfd7d (Enable auto split for depCache) is the commit which broke that behaviour.

A smaller issue is that the part sizes differ a lot (5kb vs 9kb).

Hi @matz3,

Thanks for finding those!
I have fixed the filtering for the modules.

Regarding the part sizes, it used to be due to the issue with the filtering above.
Still, there would be slight differences- the same as with preloads. It's not possible to have them perfectly equal.

Cheers

@matz3 matz3 dismissed their stale review December 5, 2023 13:34

Issues are solved

@d3xter666 d3xter666 merged commit f2cf564 into main Dec 6, 2023
17 checks passed
@d3xter666 d3xter666 deleted the new-depCache-bundle branch December 6, 2023 07:59
d3xter666 added a commit to SAP/ui5-tooling that referenced this pull request Dec 13, 2023
Adds information about specVersion 3.2

**_Note:_** This change shouldn't be merged before:
- SAP/ui5-builder#951
- SAP/ui5-project#673

---------

Co-authored-by: Matthias Oßwald <mat.osswald@sap.com>
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