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§
- File
RefRecord - A single Pass-2 reference observed during StatementsAnalyzer.
keymirrorsCodebase::symbol_reference_locationskeys so that consumers can aggregate by the same schememark_*_referenced_atwould have used. - File
Refs Arc - Symbol
Refs Arc
Functions§
- file_
refs - Run Pass-2 analysis on
fileagainst the workspace codebase and return every resolved reference with its codebase key and byte span. - symbol_
refs - Aggregate every file’s
file_refsfiltered bykeyinto a flat(uri, start, end)list — drop-in replacement forCodebase::get_reference_locations.