Align ExecuteContext task accessor names (#99258)
### What? Align `ExecuteContext` task accessors around their behavior when a task is absent: keep the frequently used `task`, use `try_task` for optional access, and `task_or_create` where storage may need to be materialized. ### Why? The three operations had inconsistent names despite sharing the same task-access mechanism. In addition, the diagnostic `get_task_name` path could create storage merely to name a missing task. ### How? Keep the shared private task-opening logic and its existing access policies; rename the public context methods and their callers. `get_task_name` now takes the optional path and returns `"unknown"` if the task is absent, without creating storage. The separate `Backend::get_or_create_task` API is unchanged. ### Verification - `cargo fmt --all -- --check` - `cargo test -p turbo-tasks-backend --test basic --test errors --test invalidation` (19 passed) - `git diff --check` <!-- fleet 8ec6f3d1-8af4-46e7-9a88-fd25742f533d --> --------- Co-authored-by:vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by:
Luke Sandberg <210140+lukesandberg@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment