Skip to content

Custom Bundles: sections of mode "bundleInfo" are ignored by AutoSplitter #1068

@codeworrior

Description

@codeworrior

Expected Behavior

When I define a. custom bundle with option numberOfParts > 1, all defined sections of the custom bundle should be present in the result, including any section of mode bundleInfo.

Current Behavior

The AutoSplitter helper which splits an already resolved bundle into the configured number of parts, "ignores" sections of mode bundleInfo. The bundle infos are missing in the generated bundle parts.

Steps to Reproduce the Issue

Note: the following description only works for SAP employees

  1. fetch change 6561900 for the ushell library
  2. build the project for sap.ushell using Maven
  3. Check the content of the created sap/ushell/bootstrap/core-min-[0-3].js bundles. None of them contains a bundle info configuration.

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 4.0.16
  • Node.js Version: 22.13.1
  • npm Version: 10.9.2
  • OS/Platform: unknown

Log Output / Stack Trace

Log output while initial bundle definition is resolved (here, the bundleInfo section is still known and processed)

...
verb lbt:bundle:Resolver     Resolving section 'sap/ushell/preload-bundles/flex-plugins.js' of type bundleInfo
verb lbt:resources:ResourceFilterList Filetypes: .js,.control.xml,.fragment.html,.fragment.json,.fragment.xml,.view.html,.view.json,.view.xml
verb lbt:resources:ResourceFilterList   sap/ushell/plugins/BaseRTAPlugin.js --> include: "sap/ushell/plugins/BaseRTAPlugin.js"
verb lbt:resources:ResourceFilterList   sap/ushell/appRuntime/ui5/plugins/baseRta/ --> include: /^sap\/ushell\/appRuntime\/ui5\/plugins\/baseRta\/(?:[^/]+\/)*[^/]*(?:\.js|\.control\.xml|\.fragment\.html|\.fragment\.json|\.fragment\.xml|\.view\.html|\.view\.json|\.view\.xml)$/
verb lbt:bundle:Resolver     Resolving section of type require
...

Later, when the already split bundle definitions for the parts are processed:

verb lbt:bundle:Resolver   Resolving bundle definition sap/ushell/bootstrap/core-min-3.js
verb lbt:bundle:Resolver     Resolving section 'sap/ushell/core-lib-preload' of type preload
verb lbt:resources:ResourceFilterList Filetypes: .js,.control.xml,.fragment.html,.fragment.json,.fragment.xml,.view.html,.view.json,.view.xml
verb lbt:resources:ResourceFilterList   sap/ushell/URLTemplateProcessor/Functions.js --> include: "sap/ushell/URLTemplateProcessor/Functions.js"
verb lbt:resources:ResourceFilterList   sap/ushell/URLTemplateProcessor/Resolvers.js --> include: "sap/ushell/URLTemplateProcessor/Resolvers.js"
...
verb lbt:resources:ResourceFilterList   sap/ushell/utils/workpage/WorkPageService.js --> include: "sap/ushell/utils/workpage/WorkPageService.js"

>>>> at this point, I would expect some log output that indicates the processing of the bundleInfo section <<<<

verb lbt:bundle:Resolver     Resolving section of type require
verb lbt:resources:ResourceFilterList Filetypes: .js,.control.xml,.fragment.html,.fragment.json,.fragment.xml,.view.html,.view.json,.view.xml
verb lbt:resources:ResourceFilterList   sap/ui/core/Core.js --> include: "sap/ui/core/Core.js"
verb lbt:bundle:Resolver   Resolving bundle done

It's a bit hard to prove that something is missing in the log. But before the require section is processed for part 3, the bundleInfo should be processed. The log does not report anything for that section. Checking the source of the AutoSplitter here and here shows that it completely ignores sections of mode bundleInfo.

Metadata

Metadata

Assignees

Labels

needs triageNeeds to be investigated and confirmed as a valid issue that is not a duplicate

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions