pub fn update_file_incremental(
index: &mut SemanticIndex,
project_root: &Path,
path: &Path,
content: &str,
) -> IncrementalUpdateResultExpand description
Update a single file in an existing SemanticIndex.
This performs an incremental update:
- Remove all data for the old version of the file (if it exists)
- Re-extract the file
- Add the new symbols, tokens, references, scopes
- Re-resolve edges for the new symbols
This is much faster than rebuilding the entire index (~20-50ms per file).
§Arguments
index- The existing SemanticIndex to updateproject_root- Project root path for computing relative pathspath- Path to the file to updatecontent- New content of the file
§Returns
Statistics about the update operation