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

fix: Do not evaluate traits of traits members recursively #1305

Merged

Conversation

ghostbuster91
Copy link
Contributor

@ghostbuster91 ghostbuster91 commented Nov 21, 2023

Closes #1296

PR Checklist (not all items are relevant to all PRs)

  • Added unit-tests (for runtime code)
  • Added bootstrapped code + smoke tests (when the rendering logic is modified)
  • Added build-plugins integration tests (when reflection loading is required at codegen-time)
  • Added alloy compliance tests (when simpleRestJson protocol behaviour is expanded/updated)
  • Updated dynamic module to match generated-code behaviour
  • Added documentation
  • Updated changelog

* Should be used only on the call site
* of the trait application where there is no need to call `unfoldTrait` for every hint of the trait.
*/
def getFieldsPlain: List[Field] =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

thought: this could be a different type which would make a mistake impossible. Question is, whether it is worth the effort.

@ghostbuster91 ghostbuster91 marked this pull request as ready for review November 23, 2023 15:54
Copy link
Contributor

@Baccata Baccata left a comment

Choose a reason for hiding this comment

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

Very well done !

@Baccata Baccata merged commit 8ba0e55 into disneystreaming:series/0.18 Nov 30, 2023
11 checks passed
@ghostbuster91 ghostbuster91 deleted the i1296/recursive-trait branch November 30, 2023 19:42
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.

Rendering: Traits used recursively in their direct struct members cause a StackOverflowError
2 participants