pub struct Snapshot {
pub checkout: PathBuf,
pub head: String,
pub sdds: Vec<SddAt>,
pub graph: UnitGraph,
pub resolved: Result<Resolution, Cycles>,
pub ownership: Ownership,
pub spec: SpecFiles,
}Expand description
The repository at one commit, as the re-check cascade reads it.
Fields§
§checkout: PathBufThe checkout the SDDs were loaded from.
head: StringThe commit, in full.
sdds: Vec<SddAt>Every SDD of the repository, sorted by slug, then root.
graph: UnitGraph§resolved: Result<Resolution, Cycles>The graph’s order and closures, or its cycles.
ownership: Ownership§spec: SpecFilesImplementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn load(
git: &Git,
checkout: &Path,
head: &str,
) -> Result<Snapshot, CoreError>
pub fn load( git: &Git, checkout: &Path, head: &str, ) -> Result<Snapshot, CoreError>
Load every SDD of the repository from checkout, which holds the
tree of the commit head names (a lane checkout reset to it, or the
primary checkout at HEAD). An SDD that cannot be read is an error:
without it the graph, and every closure through it, is incomplete.
Sourcepub fn load_resolvable(
git: &Git,
checkout: &Path,
head: &str,
) -> Result<(Snapshot, Option<Cycles>), CoreError>
pub fn load_resolvable( git: &Git, checkout: &Path, head: &str, ) -> Result<(Snapshot, Option<Cycles>), CoreError>
Snapshot::load for a run that must go on whatever one SDD holds:
an SDD that cannot be read is left out, and when the unit graph has
a cycle the SDDs with a unit on one are left out of the graph — so
the rest still get their closures, dirty sets and priorities — and
the cycles are returned. Ownership and spec files still count every
SDD read, so a change to a left-out SDD’s files is still its own.
Sourcepub fn candidates(&self) -> Vec<Candidate>
pub fn candidates(&self) -> Vec<Candidate>
Every unit Verified at the head, with its anchor; sorted by node.
Sourcepub fn dirty(&self, git: &Git, mode: Mode) -> Result<Cascade, CoreError>
pub fn dirty(&self, git: &Git, mode: Mode) -> Result<Cascade, CoreError>
Which Verified units, and which suites, must be checked again at the
head. In Mode::Changes git is asked for one diff per distinct
anchor; in Mode::Everything nothing is asked and everything is
dirty.
Sourcepub fn dirty_with(
&self,
git: &Git,
mode: Mode,
cache: &mut DiffCache,
) -> Result<Cascade, CoreError>
pub fn dirty_with( &self, git: &Git, mode: Mode, cache: &mut DiffCache, ) -> Result<Cascade, CoreError>
Snapshot::dirty, with what an earlier head’s diffs found kept in
cache: a run reads every head, and most of what changed since an
anchor had changed by the head before.