Skip to main content

Module session

Module session 

Source
Expand description

Session-based analysis API for incremental, per-file analysis.

AnalysisSession owns the salsa database and per-session caches for a long-running analysis context shared across many per-file analyses. Reads clone the database under a brief lock, then run lock-free; writes hold the lock briefly to mutate canonical state. MirDb::clone() is cheap (Arc-wrapped registries), so this pattern gives parallel readers without blocking on concurrent writes for longer than the clone itself.

See crate::file_analyzer::FileAnalyzer for the per-file Pass 2 entry point that operates against a session.

Structsยง

AnalysisSession
Long-lived analysis context. Owns the salsa database and tracks which stubs have been loaded.