You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Variant] List and object builders have no effect until finalized (#7865)
# Which issue does this PR close?
- Closes#7863
- Closes#7798
# Rationale for this change
Reviews and testing on #7843
exposed the fact that creating a variant list or object builder has side
effects that leave the parent in an inconsistent/invalid state if the
child builder is never finalized. Rework the finalization logic to be
more direct so that child builders have no effect on their parents
before their `finish` method is called.
# What changes are included in this PR?
* Define a new `ParentState` enum that tracks the necessary information
for a child to fully finalize its parent.
* Remove the `pending` machinery from builders
# Are these changes tested?
Existing unit tests mostly cover this change.
Added new tests to verify that failing to call `finish` leaves the
parent unmodified.
# Are there any user-facing changes?
No.
0 commit comments