pub fn plan_for_node<N>(
node: &N,
recursive: bool,
source_id: u32,
offset: u32,
) -> Option<Rc<GroupPlan>>where
N: HasEntry,Expand description
The plan for one binder node, computed ON DEMAND and memoized.
★ Replaces a parse-door walk that planned every binder in every parsed file. Laziness means most of those are never evaluated, so that work was mostly discarded — measured as a ~4% wall-clock tax on a real nixpkgs eval. Planning at first evaluation is identical in result (a group’s plan depends only on its own entries) and pays only for groups that are reached.
The memo is keyed exactly as before, so a plan computed for a node at
offset o in one parse tree is never read for a different (imported) tree
with a binder at the same offset.
A None return is a POSITIVE statement — the group has no duplicate static
key and no dotted path, so the caller’s existing path is already correct.
See the module docs on why that is not a fallback.