Skip to main content

Module refs

Module refs 

Source
Expand description

file_refs / symbol_refs salsa queries — Phase D.

Replaces the imperative build_reference_index scan that ran on workspace startup. References are now computed lazily on first textDocument/references call and memoized thereafter. Body-only edits to a single file invalidate only that file’s file_refs; structural edits also invalidate codebase(ws) which cascades into every file_refs because StatementsAnalyzer depends on the finalized codebase.

Structs§

FileRefRecord
A single Pass-2 reference observed during StatementsAnalyzer. key mirrors Codebase::symbol_reference_locations keys so that consumers can aggregate by the same scheme mark_*_referenced_at would have used.
FileRefsArc
SymbolRefsArc

Functions§

file_refs
Run Pass-2 analysis on file against the workspace codebase and return every resolved reference with its codebase key and byte span.
symbol_refs
Aggregate every file’s file_refs filtered by key into a flat (uri, start, end) list — drop-in replacement for Codebase::get_reference_locations.