Expand description
Best-effort name resolution over an assembled view (ticket G).
The base graph is a heuristic call graph: references match a target by
name, so callers_of("foo") returns callers of any foo. This layer
resolves each reference to the specific defining path it most likely means,
disambiguating same-named symbols across files:
- Qualified — the call site named an owner (
Beta::get()) and exactly one definition in the view is owned by it (#248). - Local — a definition of the name in the reference’s own file wins.
- Unique global — otherwise, the sole definition across the view.
- Ambiguous — multiple definitions and none local: left unresolved.
- Unresolved — no definition in the view (honest dangling, ADR 0012).
The qualifier rule only ever narrows. A Rust qualifier is as often a
module as a type, and most modules are files rather than inline mod
blocks, so nothing in the view is owned by them; declining those edges would
lose attributions the view makes correctly today. When a qualifier matches
no owner it is ignored and the remaining rules apply unchanged.
Resolution is file-scoped (not yet import-aware); it is a pure function of a
GraphStore’s query methods, so it works over any backend and adds no
trait surface. Import-following resolution is a further step, and is also
what would let a module path be told from a type — at which point an
unmatched qualifier could decline rather than fall through (#252).
Structs§
- Impact
Node - One symbol reached by an impact closure, identified by the path that defines it rather than by name alone.
- Impact
Report - The result of a resolution-gated impact walk.
- Resolved
Reference - A reference resolved (best-effort) to the path of the symbol it refers to.
Enums§
- Resolution
- How a reference was resolved to a definition.
Functions§
- resolve_
references_ to - Resolve every reference to
nameto a defining path (see the module docs for the strategy). - resolved_
callers_ of - Enclosing functions that call the
namedefined atdefining_path— the precision refinement ofGraphStore::callers_of, which returns callers of any same-named symbol. Sorted and deduped. - resolved_
impact - The transitive closure of callers of
name, following only edges that resolve to a specific definition.