Skip to content

fix: Check for loops and invalide children (fixes #1935) - #1947

Merged
linkdotnet merged 1 commit into
mainfrom
fix/#1935
Oct 18, 2026
Merged

linkdotnet merged 1 commit into
mainfrom
fix/#1935

Conversation

@linkdotnet

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI balanced review requested due to automatic review settings October 18, 2026 16:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused guards preserve valid-component behavior and regression tests cover both affected paths; tests were not executed.

No open issues 🎉

What changed in this PR

Fixes #1935 by preventing bUnit’s render-tree traversal from following uninstantiated child components after a render failure.

Changes:

  • Skip invalid child frames during markup generation and component discovery.
  • Add regression tests for both paths and document the fix.
File Description
tests/​bunit.tests/​Rendering/​BunitRendererTest.cs Tests traversal after child construction fails.
src/​bunit/​Rendering/​Internal/​Htmlizer.cs Skips uninstantiated children during markup generation.
src/​bunit/​Rendering/​BunitRenderer.cs Skips uninstantiated children during component discovery.
CHANGELOG.md Documents the stack-overflow fix.

Review effort: Balanced

@linkdotnet
linkdotnet merged commit 57243be into main Oct 18, 2026
11 checks passed
@linkdotnet
linkdotnet deleted the fix/#1935 branch October 18, 2026 16:13
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