Repository navigation
fix: stable identity for bracket-resolved bare attrsets - #507
Merged
Merged
Conversation
Bracket resolution through forwarded attrs on content wrappers (e.g. <gloom/apps/polybar/razermon>) produces bare attrsets without __contentValues or __provider. Without identity, these get anonymous names in processInclude and dedup fails when the same content is reached via multiple resolution paths (e.g. direct include + nested key auto-resolution via host-aspects). Two changes: 1. den-brackets.nix: tagProvider injects __provider from the full bracket path onto bare attrset results that lack identity. 2. types.nix: providerType.merge normalization detects values with __provider (not just __contentValues) and injects name + meta.provider for stable identity. Guards __contentValues access for bare attrsets that only have __provider.
sini
enabled auto-merge (squash)
May 11, 2026 07:24
drupol
reviewed
May 11, 2026
| ) | ||
| ) d.value.__contentValues; | ||
| fns = | ||
| if d.value ? __contentValues then |
Collaborator
There was a problem hiding this comment.
Nit: Can't we use lib.optionals ? (to get rid of the else [ ])
Collaborator
Author
There was a problem hiding this comment.
I gotchu next time I'm here. :D
charlesfire
pushed a commit
to charlesfire/den
that referenced
this pull request
May 16, 2026
## Summary Bracket resolution through forwarded attrs on content wrappers (e.g. `<gloom/apps/polybar/razermon>`) produces bare attrsets without `__contentValues` or `__provider`. Without identity, these get anonymous names and dedup fails when the same content is reached via multiple resolution paths. - **den-brackets.nix**: `tagProvider` injects `__provider` from the full bracket path onto bare attrset results - **types.nix**: `providerType.merge` normalization detects `__provider` (not just `__contentValues`) and injects `name` + `meta.provider` for stable identity Fixes module duplication where entries appeared twice — once from the direct include path and once from host-aspects re-resolution with anonymous identity. ## Test plan - [x] 771/771 CI tests pass - [x] den-configs polybar `modules-right` shows each module exactly once - [x] diagram-demo template evaluates (148 checks)
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
Bracket resolution through forwarded attrs on content wrappers (e.g.
<gloom/apps/polybar/razermon>) produces bare attrsets without__contentValuesor__provider. Without identity, these get anonymous names and dedup fails when the same content is reached via multiple resolution paths.tagProviderinjects__providerfrom the full bracket path onto bare attrset resultsproviderType.mergenormalization detects__provider(not just__contentValues) and injectsname+meta.providerfor stable identityFixes module duplication where entries appeared twice — once from the direct include path and once from host-aspects re-resolution with anonymous identity.
Test plan
modules-rightshows each module exactly once