Skip to content

Add recursive message support#82

Merged
mjheilmann merged 1 commit intomainfrom
feature/recursive-messages
May 1, 2026
Merged

Add recursive message support#82
mjheilmann merged 1 commit intomainfrom
feature/recursive-messages

Conversation

@mjheilmann
Copy link
Copy Markdown
Collaborator

@mjheilmann mjheilmann commented Apr 30, 2026

continued from #67

Protobuf can support recursive messages, so long as they are in the same proto file. In the current state of reflection, we assume each message is in its own file, breaking that same-file requirement. This leads reflection clients to go into an infinite loop while reflecting, and they overflow their stacks.

Since reflection should be a tree and not a graph, we can solve this by detecting cycles, and "shrinking" them into the same proto file.

@mjheilmann mjheilmann merged commit edef380 into main May 1, 2026
11 checks passed
@mjheilmann mjheilmann deleted the feature/recursive-messages branch May 1, 2026 14:51
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