Skip to content

fix: avoid mutating YAML nodes in-place when FormatStrings is enabled - #677

Open
TvdW wants to merge 1 commit into
homeport:mainfrom
TvdW:issue-676
Open

fix: avoid mutating YAML nodes in-place when FormatStrings is enabled#677
TvdW wants to merge 1 commit into
homeport:mainfrom
TvdW:issue-676

Conversation

@TvdW

@TvdW TvdW commented Jun 30, 2026

Copy link
Copy Markdown

FormatStrings was modifying scalar node values directly on the caller's nodes, which corrupted the toNames slice collected after the comparison loop in namedEntryLists. This caused false order-change diffs when comparing identical named-entry lists.

Fix by copying the nodes before modifying their Value fields so the originals remain unmodified for the rest of the comparison pipeline.

Fixes issue #676

FormatStrings was modifying scalar node values directly on the caller's
nodes, which corrupted the toNames slice collected after the comparison
loop in namedEntryLists. This caused false order-change diffs when
comparing identical named-entry lists.

Fix by copying the nodes before modifying their Value fields so the
originals remain unmodified for the rest of the comparison pipeline.

Fixes issue homeport#676
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.

1 participant