Skip to content

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

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

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

Conversation

@maxreichmann

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. This change sets the tags for skipped pairs as well.

@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

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