fix: Fix serialization of the lists_split block. #8702
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
The details
Resolves
Fixes #8692
Proposed Changes
This PR updates the
lists_split
block's implementation to serialize the state of the mode (join vs split) field. While as the old comment notes the field validator does update this, during block serialization blocks are connected to their parents before having their field values set, so at the time of connection the field validator has not yet run to set the appropriate connection check, so the block and its parent become separated due to the connection check failing. Now, the extra state will be deserialized early, update the connection checks, and allow the block to be connected to its parent during deserialization. Note that this will not resolve already-saved projects with this issue, but it will fix it going forward.