Expand description
#2719: which functions need the execution context, and where one is not available to give them.
e.detach(), e.within(d) and a.race(b) hand work to the execution context’s
waitUntil. A service handler reaches it as deps.__exec; a function has
no deps, so a function whose body (or a function it calls, or names as a
value) uses one of the three takes it as a hidden trailing parameter. This
module computes that needs-context set (a fixed point over a unit’s
functions, against the set its dependencies already settled) and refuses a
call that would bring the construct into a place with no context
(bynk.exec.unavailable).
The set is built after type checking, from what the checker resolved: a
within or race counts only when the checker recorded it as the kernel
method on an Effect receiver (Callee::Kernel), never by name, so a user
type’s own race method puts nothing in the set.
Members are keyed by their declaration’s Span: the file id is unique
across a build (dependency packages included), so a callee reached through
uses, a package alias or a sibling file names the same key as its
declaration.
Structs§
- Exec
Plan - The needs-context set for a build so far: every effectful function that
takes the hidden
__execparameter, and every service handler whosedepsmust carry__exec(its body uses a construct, or calls or names a member).
Enums§
- Why
- Why a function is in the needs-context set.
Type Aliases§
- Shared
Exec Plan - A shared snapshot, as carried on a
TypedCommons.