Skip to content

refactor(builder): Tag debug variants pairs skipped by minify - #1694

Open
maxreichmann wants to merge 15 commits into
mainfrom
fix-dbg-js-mix-in-builds
Open

maxreichmann wants to merge 15 commits into
mainfrom
fix-dbg-js-mix-in-builds

Conversation

@maxreichmann

@maxreichmann maxreichmann commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

The logic introduced in #1659, leaves these skipped resource pairs without the HasDebugVariant and IsDebugVariant tags normally set by minify.

Subsequent tasks such as generateLibraryPreload rely on these tags and produce incorrect output when they are missing.

-->
Now, the minify task uses the builder.minifcation.excludes config inside a ui5.yaml directly in it's keys() to determine which resources should be skipped or actually processed. There, we now also handle dbg/non-dbg pairs (+account excludes too), and in each(), tag such pairs and log a warning for the non-dbg member.

@maxreichmann maxreichmann changed the title refactor(builder): Tag existing debug variants pairs skipped by minify refactor(builder): Tag debug variants pairs skipped by minify Nov 3, 2026
maxreichmann and others added 8 commits November 4, 2026 13:58
If the resource was simply named "..-dbg.js", the `minify` task should process it as normal (because it's a valid case).
Only ifthere is a .js sibling, the task should ignore the debug file (covered by other test).
Separate resource discovery from minification eligibility and give existing debug pairs
their own cacheable tagging invocations. Preserve warnings for pairs not fully excluded
and leave excluded pairs unchanged.

Cover cold, warm and delta builds using persistent and in-memory caches, including pair
additions and removals.
Pass configured excludes directly to minify and compile ordered path matchers once.
Discover all JavaScript resources with one glob so excluded pairs remain visible for tagging.
Keep support rules readable by default while preserving explicit re-inclusions.

Cover matcher parity with filesystem and memory readers, single-glob enumeration,
and support-rule behavior across cold, warm, delta and configuration-change builds.
Supply the global support-file default and prefixed project exclusions from the build
definitions. Keep minify generic: match supplied virtual-path patterns without implicit
exclusions or path prefixes, preserving ordered re-inclusions and single-glob discovery.

Retain the local pattern extraction in defineTask and cover standalone task behavior,
normalized definition options, and unchanged cached build results.
@matz3
matz3 force-pushed the fix-dbg-js-mix-in-builds branch from 9df6fa7 to adbba24 Compare November 4, 2026 16:41
@matz3
matz3 marked this pull request as draft November 4, 2026 16:52
@matz3

matz3 commented Nov 4, 2026

Copy link
Copy Markdown
Member

I've updated the PR to have the minify task tag all relevant resources accordingly, even if they are not minified. It also fixes two general problems that were discovered while working on this.

Converted back to draft as I still have to review all changes in-depth and update the title/body. But any comment/feedback is already welcome.

@matz3 matz3 self-assigned this Nov 4, 2026
These commits introduced proper validation of tags in caches. They will be included in a follow-up PR again (because being out of scope here).

+ Adjust/Remove tests for this logic
@maxreichmann maxreichmann assigned maxreichmann and unassigned matz3 Nov 16, 2026
@maxreichmann

maxreichmann commented Nov 18, 2026 •

Copy link
Copy Markdown
Member Author

I've updated this PR by only focusing on minify, leaving general cache fixes for later (I'll create follow-up PRs). I did some cleaning and added comments while preserving all the semantics. The handling of debug pairs is unchanged and they still get correct tags. Only small change: a warning is only logged when the normal .js file is NOT excluded.

Happy for a review :)

@maxreichmann
maxreichmann marked this pull request as ready for review November 18, 2026 15:24
@maxreichmann
maxreichmann requested review from a team and removed request for a team November 18, 2026 15:26

This branch has not been deployed

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

2 participants