Skip to main content

collect_fact_diagnostics_incremental

Function collect_fact_diagnostics_incremental 

Source
pub async fn collect_fact_diagnostics_incremental(
    root: &Path,
    config: &RulesConfig,
    filter_ids: Option<&HashSet<String>>,
    filter_rule: Option<&str>,
    changed_files: Option<&[PathBuf]>,
) -> Vec<Diagnostic>
Expand description

Collect fact rule diagnostics with optional incremental evaluation.

changed_files is a slice of relative file paths (e.g. ["src/foo.rs"]) whose index facts have changed since the last call. When Some, the process-level engine cache is consulted: each rule’s engine is primed on the first call and only the strata affected by the changed files are re-derived on subsequent calls.

Pass None for changed_files to bypass the cache and do a fresh full evaluation. This is the correct choice for one-shot CLI invocations where no previous engine state is available or relevant.