Repository navigation
fix: list-merge includes/excludes in content wrapper merge - #524
Merged
Merged
Conversation
aspectContentType shallow-merges forwarded attrs with foldl' //. This is last-win per key, which silently drops list values from earlier modules — e.g., multiple modules each adding to includes would only keep the last module's list. Before denful#521 this was masked by auto-walking nested keys; after denful#521 content wrappers don't auto-walk, so the incomplete includes became the only resolution path and children were silently dropped. Generalize the fix to all list-valued keys rather than special- casing includes/excludes by name: any key whose definitions are all lists gets concatenated in both aspectContentType.merge (for forwarded access) and mergeContentValuesPerKey (for auto-walk).
sini
force-pushed
the
fix/content-wrapper-includes-merge
branch
from
May 12, 2026 19:49
616f368 to
2c842a5
Compare
theutz
approved these changes
May 12, 2026
charlesfire
pushed a commit
to charlesfire/den
that referenced
this pull request
May 16, 2026
## Summary
- **Content wrapper includes merge**: When multiple modules each add
children to an aspect's `includes` list (e.g., `polybar.includes =
[coreuse]` in one file, `polybar.includes = [wifi]` in another),
`aspectContentType.merge` shallow-merged forwarded attrs with `foldl'
//`, keeping only the last module's list. Now `includes` and `excludes`
are explicitly concatenated across all content value definitions.
- **mergeContentValuesPerKey includes handling**: The per-key
reconstruction in `emitNestedAspect` wrapped `includes` in a `{
__contentValues, __provider }` content wrapper instead of
list-concatenating, causing `expected a list but found a set` crashes on
the auto-walk path. Now list-concatenates these structural keys.
Fixes a regression exposed by denful#521 — before that change, auto-walking
masked the incomplete includes list by resolving nested keys regardless.
After denful#521 correctly suppressed auto-walking for content wrappers, the
incomplete includes became the only resolution path and children from
earlier modules were silently dropped.
## Test plan
- [x] Added regression test: multiple modules each contributing to
`polybar.includes` — all children resolved
- [x] Added regression test: auto-walk path with multi-module includes —
no crash, all children resolved
- [x] Existing `nested-aspect-includes` scoping tests pass (2/2)
- [x] Existing `nested-aspect-merge` test passes (1/1)
- [x] Existing `nested-aspects` suite passes (6/6)
- [x] Full CI: 778/778 passing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
includeslist (e.g.,polybar.includes = [coreuse]in one file,polybar.includes = [wifi]in another),aspectContentType.mergeshallow-merged forwarded attrs withfoldl' //, keeping only the last module's list. Nowincludesandexcludesare explicitly concatenated across all content value definitions.emitNestedAspectwrappedincludesin a{ __contentValues, __provider }content wrapper instead of list-concatenating, causingexpected a list but found a setcrashes on the auto-walk path. Now list-concatenates these structural keys.Fixes a regression exposed by #521 — before that change, auto-walking masked the incomplete includes list by resolving nested keys regardless. After #521 correctly suppressed auto-walking for content wrappers, the incomplete includes became the only resolution path and children from earlier modules were silently dropped.
Test plan
polybar.includes— all children resolvednested-aspect-includesscoping tests pass (2/2)nested-aspect-mergetest passes (1/1)nested-aspectssuite passes (6/6)