Skip to content

Conversation

@ericwenn
Copy link
Member

Currently the generator will panic due to stack overflow when generating
from a proto descriptor with cycles. For example
google.protobuf.Struct contains such loops.

This commit fixes this issue by:

  • Collecting comments for top level messages
  • When encountering the same message again, exit early

@ericwenn ericwenn requested a review from a team as a code owner December 23, 2025 12:29
Currently the generator will panic due to stack overflow when generating
from a proto descriptor with cycles. For example
`google.protobuf.Struct` contains such loops.

This commit fixes this issue by:
* Collecting comments for top level messages
* When encountering the same message again, exit early
@ericwenn ericwenn force-pushed the stack-overflow-comments branch from 979d03a to a6e59e3 Compare December 23, 2025 12:33
@ericwenn ericwenn merged commit 5c20576 into master Dec 23, 2025
1 check passed
@ericwenn ericwenn deleted the stack-overflow-comments branch December 23, 2025 13:00
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.

3 participants