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

Add support to generate builders in code generation #97

Open
1 of 2 tasks
desaikd opened this issue Apr 9, 2024 · 0 comments
Open
1 of 2 tasks

Add support to generate builders in code generation #97

desaikd opened this issue Apr 9, 2024 · 0 comments
Labels
code generation Improvements for code generation subcommand `generate`

Comments

@desaikd
Copy link
Contributor

desaikd commented Apr 9, 2024

We should not expose the constructor, if we can help it. Unless we generate overloaded constructors, using a constructor means that adding a new optional field is backwards incompatible. (And if you have two optional fields with the same type, then you've got a pretty good chance of having a method signature conflict.) On the other hand, if we use builders, then the generated order doesn't matter for us or for consumers of the generated code.

I don't think it needs to be solved now, but it does need to be called out as a current limitation, and it needs to be fixed before we can say that it is ready for customers to use.

Implementation checklist for programming languages:

  • Rust
  • Java

Originally posted by @popematt in #95 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code generation Improvements for code generation subcommand `generate`
Projects
Status: No status
Development

No branches or pull requests

1 participant