-
Notifications
You must be signed in to change notification settings - Fork 55
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
Alternate staged builders that handle optional, etc. #180
Conversation
7b12bce
to
5e372a2
Compare
This is perfect! I'm going to test it on our codebase and report possible issues in the next few days. I don't expect any though, this is the design I envisioned, thank you! |
Let me know and I'll merge. |
There is a bug when immutableCollections are enabled together with STAGED_REQUIRED_ONLY option. The code does not compile, as the stage for the collection is detected as NOT REQUIRED yet the builder is not generated. See #182 for a reproducer. |
Fix for the bug is in 9632f41. The configurations around collections and nullability are getting pretty complicated :/
|
The changes in #182 make it work for us, but as I said above, the behaviour with nullability is now not uniform. I'd consider merging this change and then discuss the following proposal: "1st" layer:
"2nd" layer:
|
@olsavmic I agree some of the options have gotten out of hand. Too many cooks and not enough quality. I'd like to deprecate a lot of it and re-work it. |
A variant of staged builders is available that only stages required record components. Any optional components (when `addConcreteSettersForOptional` is enabled) are not staged and are added to the final stage. Additionally, if Collection options are enabled, those too are added to the final stage. Closes #170
5e372a2
to
919a567
Compare
A variant of staged builders is available that only stages required record components. Any optional components (when
addConcreteSettersForOptional
is enabled) are not staged and are added to the final stage. Additionally, if Collection options are enabled, those too are added to the final stage.Closes #170
attn: @olsavmic
Reviewers - please test various use cases. I'm not very familiar with this feature and did what I thought was right.