next.js
148c7ff0 - Rename TaskExecutionReason::Initial to Root (#93922)

Commit
63 days ago
Rename TaskExecutionReason::Initial to Root (#93922) ### What? Renames the `TaskExecutionReason::Initial` variant to `TaskExecutionReason::Root` in turbo-tasks, and updates its `as_str()` representation from `"initial"` to `"root"`. ### Why? The variant's doc comment already describes it as "A root task was initially scheduled and is executed". The name `Initial` is misleading because it suggests "first execution of any task", which overlaps semantically with other variants like `ActivateInitial` (a task activated for the first time with no output yet). `Root` accurately reflects that this reason is specifically used when a root task is scheduled, making the enum easier to read and reason about at call sites and in traces. ### How? - `turbopack/crates/turbo-tasks/src/task_execution_reason.rs`: rename the enum variant `Initial` → `Root` and update the `as_str()` mapping to return `"root"`. - `turbopack/crates/turbo-tasks-backend/src/backend/storage_schema.rs`: update the single construction site that used `TaskExecutionReason::Initial` when scheduling a root task. No behavioral changes — this is a pure rename. The other `*Initial` variant (`ActivateInitial`) is intentionally left untouched because it describes a different concept (first-time activation of a non-root task). Verified with `cargo check` and `cargo clippy` on `turbo-tasks` and `turbo-tasks-backend`. Closes NEXT- Fixes # Co-authored-by: v-work-app[bot] <262237222+v-work-app[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Tobias Koppers <sokra@users.noreply.github.com>
Author
Parents
Loading