Skip to content

fix: BugOrBroken - partially-shadowed object has nested delayed merge#846

Merged
johanandren merged 1 commit intomainfrom
wip-regression-resolve-substitions
May 5, 2026
Merged

fix: BugOrBroken - partially-shadowed object has nested delayed merge#846
johanandren merged 1 commit intomainfrom
wip-regression-resolve-substitions

Conversation

@johanandren
Copy link
Copy Markdown
Collaborator

@johanandren johanandren commented May 4, 2026

The 1.4.7 fix for #838 (commit 833bacb) added per-key pruning that built a new SimpleConfigObject containing only the unshadowed keys and substituted it for end before resolving. The outer ConfigDelayedMergeObject still referenced the original (unpruned) end in its stack, so any inner ConfigDelayedMerge whose resolution walked the parent chain back up failed replaceChildInList with:

BugOrBroken: tried to replace SimpleConfigObject({...}) which is not in [...]

This fixes that by narrowing the pruning to a whole-entry skip: only continue when every key in end is shadowed by an ignoresFallbacks value in merged. Never substitute a partial copy of end, that changes identity and breaks the parent-chain walk.

Copy link
Copy Markdown
Contributor

@patriknw patriknw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johanandren johanandren merged commit b0a1e43 into main May 5, 2026
5 of 13 checks passed
@johanandren johanandren deleted the wip-regression-resolve-substitions branch May 5, 2026 11:11
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