next.js
2dbc947c - Turbopack: fix incorrect graph state bug (#81202)

Commit
197 days ago
Turbopack: fix incorrect graph state bug (#81202) ### What? Technically a task should start with `Dirty` flag set and propagate that info through the aggregation graph. But that would be very expensive to do in the initial compilation. So we have the extra check of tasks not having Output set. But there is this rare case where a task A calls a task B purely for side effects without `await`ing the output. In this case A would become clean, while B is in its initial computation and don't have Dirty set. This would lead to the subgraph being incorrectly considered as clean. To fix that case, we eagerly mark all children as Dirty when they don't have Output set, once the parent task gets its Output set. But there was a bug in that implementation where we early exit when Output is set to something equal the previous Output.
Author
Parents
Loading