vide/test/debug-update-queue.patch
2025-03-15 12:09:02 -03:00

23 lines
1.6 KiB
Diff

diff --git a/src/graph.luau b/src/graph.luau
index f01db1f..20a28e9 100644
--- a/src/graph.luau
+++ b/src/graph.luau
@@ -222,6 +222,18 @@ local function queue_children_for_update<T>(node: SourceNode<T>)
until false
update_queue.n = queue_index
+ print(`update_queue({update_queue.n}):`)
+ for index, node in update_queue do
+ if index :: any == 'n' then continue end
+ if not node or not node.effect then continue end
+ print(
+ index,
+ debug.info(node.effect, 'n'),
+ node.higher_parent_update_id == node.last_eval_update_id and 'valid' or 'invalid',
+ node.needs_queue_children and 'queue children',
+ unpack(node)
+ )
+ end
end
local function get_update_queue_length()