pub struct IncrementalCompiler { /* private fields */ }Expand description
Incremental compiler that tracks file content hashes to detect changes.
Implementations§
Source§impl IncrementalCompiler
impl IncrementalCompiler
Sourcepub fn from_graph(graph: &CodeGraph) -> Self
pub fn from_graph(graph: &CodeGraph) -> Self
Build an incremental compiler from an existing graph.
Extracts file paths from the graph’s code units and computes current content hashes for each file.
Sourcepub fn detect_changes(&self, dir: &Path) -> AcbResult<ChangeSet>
pub fn detect_changes(&self, dir: &Path) -> AcbResult<ChangeSet>
Detect which files have changed relative to the stored hashes.
Walks the directory for supported source files and compares content hashes against the stored state.
Sourcepub fn recompile(
&mut self,
dir: &Path,
changes: &ChangeSet,
) -> AcbResult<(CodeGraph, IncrementalResult)>
pub fn recompile( &mut self, dir: &Path, changes: &ChangeSet, ) -> AcbResult<(CodeGraph, IncrementalResult)>
Perform incremental recompilation.
Re-parses changed files and rebuilds the graph. For simplicity, this performs a full rebuild when changes are detected — true surgical graph patching is a future optimisation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IncrementalCompiler
impl RefUnwindSafe for IncrementalCompiler
impl Send for IncrementalCompiler
impl Sync for IncrementalCompiler
impl Unpin for IncrementalCompiler
impl UnsafeUnpin for IncrementalCompiler
impl UnwindSafe for IncrementalCompiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more