next.js
25646b92 - [turbopack] Remove incorrect debug_assert in try_read_task_cell (#91699)

Commit
11 days ago
[turbopack] Remove incorrect debug_assert in try_read_task_cell (#91699) ### What? Removes the `debug_assert_not_in_top_level_task` call from `try_read_task_cell` in `turbopack/crates/turbo-tasks/src/manager.rs`. ### Why? The assertion was wrong. `debug_assert_not_in_top_level_task` panics with the message: > "Eventually consistent read cannot be performed from a top-level task." The restriction only applies to **eventually consistent** reads (e.g. task output reads), which can return stale data if called from a top-level task (`.run_once(...)`). Cell reads, however, are **strongly consistent** — they always return up-to-date data. There is no semantic reason to forbid reading a cell from a top-level task, and the assert was producing false positives in valid call sites. ### How? Delete the three lines that guard and invoke `debug_assert_not_in_top_level_task` inside `try_read_task_cell`. The function itself and its usage in `try_read_task_output` / `try_read_local_output` (which are genuinely eventually-consistent) are unchanged. --------- Co-authored-by: Tobias Koppers <sokra@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
Author
Parents
Loading