Skip to main content

index

Function index 

Source
pub async fn index(
    root: &Path,
    src: &Path,
    repo: &str,
    view: &str,
) -> Result<IndexSummary>
Expand description

Index the source files under src into the (repo, view) code-graph view: parse each file into a content-addressed slice, then reconcile the view’s manifest to the tree (ADR 0012). Re-running updates the view.

When src is the root of a git repo and a base commit was recorded on a prior run, the changed set is sourced directly from git diff (only the added/modified files are re-parsed and deleted files dropped) — the incremental driver of gonzalo#93. Otherwise the full tree is walked. Either way the manifest is reconciled as a set, so a full walk always converges the view even if an incremental run ever missed a change. Slices orphaned by deletions are left for a separate GC pass (which must see all live views).