Describe the bug
If you have
- an each loop
- using a derived
- with async work inside the each block
- and you create multiple batches (e.g. by causing overlapping async work)
Then you run into an infinite loop. It happens because
- In
batch.#traverse we add blocks to maybe_dirty, so the each block will always be maybe dirty
- In
deriveds.js we don't reset the status of the derived if batch_values is present, so the derived always stays dirty
- -> In combination this means the each block keeps rerunning
Reproduction
playground - spam the button a few times and observe that the log keeps showing up, i.e. the derived keeps rerunning.
Logs
System Info
Severity
blocking an upgrade
Describe the bug
If you have
Then you run into an infinite loop. It happens because
batch.#traversewe add blocks tomaybe_dirty, so the each block will always be maybe dirtyderiveds.jswe don't reset the status of the derived ifbatch_valuesis present, so the derived always stays dirtyReproduction
playground - spam the button a few times and observe that the log keeps showing up, i.e. the derived keeps rerunning.
Logs
System Info
Severity
blocking an upgrade