-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
BlockChange
mutation
events not fired in the correct order and/or at all
#1036
Comments
@NeilFraser is this the bug/situation you are currently looking at with mutator events? |
BlockChange
events not omitted in the correct order and/or at all
BlockChange
events not omitted in the correct order and/or at allBlockChange
events not fired in the correct order and/or at all
BlockChange
events not fired in the correct order and/or at allBlockChange
mutation
events not fired in the correct order and/or at all
This bug reported the underlying root cause of at least two later bugs (#2037—which has been more than once— and #8225) as well as a contributing cause to at least one other (#7950).
|
[Edit by @cpcallen, 2024-08-30:]
When a block is mutated,
BlockChange
events are either not emitted, or emitted out-of-order with respect toBlockMove
events that record child blocks being disconnected and reconnected. This has been the root cause of multiple other issues. See comment below for full write-up of situation as it currently stands.[Original description:]
Mutation events are pulled ahead of other events in a group. It is not clear why this is necessary, but it leads to a situation, where other events can reference inputs of the mutated block that no longer exist (assuming sequential processing).[Edit: this specific problem was fixed with a better band-aid in #8539.]For cross-platform simplicity, events should be emitted in an order that can be processed sequentially. In this case, the move event that disconnects the attached block should occur before the mutation event that deletes the input.
Before:
After:
Playground Events, with mutation change before move and
oldInputName
:Similar construction in the mirror demo does not reference the missing input (no
oldInputName
field).The text was updated successfully, but these errors were encountered: