Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demonstrate recursion and stackoverflow error #19

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Dogacel
Copy link
Contributor

@Dogacel Dogacel commented Aug 3, 2023

No description provided.

@mscheong01
Copy link
Owner

Hi @Dogacel, What do you think should be the expected output when recursive proto messages are defined? With our current API, this stackoverflowerror seems inevitable, unless #9 is implemented

@Dogacel
Copy link
Contributor Author

Dogacel commented Aug 8, 2023

Hi @Dogacel, What do you think should be the expected output when recursive proto messages are defined? With our current API, this stackoverflowerror seems inevitable, unless #9 is implemented

Technically, a recursive proto message is never serializable thus I see two options other than #9:

  1. Error during code-generation for never serializable / initiliazible objects.
  2. Automatically infer nullability for recursive objects.

The error I demonstrate should be the last resort, in my personal opinion, I think users should know this beforehand either by seeing the nullable type of getting an error during code-generation. For example you can allow skipping erroneous code.

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.

None yet

2 participants