Expand description
Salsa-based incremental computation layer.
After the mir-analyzer 0.22 migration, semantic analysis (Pass 2, class
issues, references) is owned by AnalysisSession in DocumentStore.
Salsa here is now responsible for the LSP-side compact representations
only: parsed AST cache (parse), per-file declaration index (index),
method-return-type cache (method_returns), workspace aggregation
(workspace_index). These power cross-file LSP features
(workspace symbols, document symbols, find-implementations, hover from
index) that don’t require the analyzer’s full type system.
Re-exports§
pub use input::FileId;pub use input::SourceFile;pub use input::Workspace;
Modules§
- analysis
- Database + AnalysisHost split (rust-analyzer pattern).
- index
file_indexsalsa query — derives a compactFileIndexfrom a parsed document. Depends onparsed_doc, so editing a file reparses once and the index re-extracts from the new AST.- input
- Salsa inputs.
- method_
returns method_returnssalsa query — derives the per-file map ofclass_name -> method_name -> return_class_name. Depends onparsed_doc.- parse
- The
parsed_docsalsa query: parses aSourceFileinto anArc<ParsedDoc>under salsa memoization. Downstream queries (file_index, method_returns, semantic diagnostics) depend on this one, so each file is parsed at most once per revision. - workspace_
index workspace_indexsalsa query — aggregates every file’sFileIndexinto a single structure with pre-built reverse maps.