Skip to main content

resolved_impact

Function resolved_impact 

Source
pub fn resolved_impact(
    store: &dyn GraphStore,
    name: &str,
    max_depth: Option<usize>,
) -> ImpactReport
Expand description

The transitive closure of callers of name, following only edges that resolve to a specific definition.

GraphStore::impact walks the name-matched graph, so one hop into a name with several unrelated definitions absorbs every subgraph sharing that identifier — on gonzalo itself a single seed reached a quarter of the repository (#207). This walk keys nodes on (name, defining path) and consults resolve_references_to for every edge, so an Ambiguous reference is counted and dropped instead of merging two graphs.

A caller’s own path needs no resolution: the enclosing function of a call is by definition in the file containing that call, so each reached node gets an exact path.

This gates Ambiguous edges only. A name defined exactly once still resolves UniqueGlobal even when the call really meant a std or dependency method of the same name, which remains a source of false edges (#223).

max_depth bounds the walk (None = unbounded); an ambiguous seed is walked from each of its definitions, since the caller asked about all of them.