pub struct PreprocessResult {
pub regular_entries: Vec<PackEntry>,
pub virtual_entries: Vec<PackEntry>,
pub source_map: HashMap<PathBuf, PathBuf>,
pub rendered_bytes: HashMap<PathBuf, Arc<[u8]>>,
pub skipped: Vec<SkippedRender>,
}Expand description
The result of preprocessing a pack’s file entries.
Fields§
§regular_entries: Vec<PackEntry>Entries that were NOT preprocessed (pass through unchanged).
virtual_entries: Vec<PackEntry>Virtual entries created by preprocessing (point to datastore files).
source_map: HashMap<PathBuf, PathBuf>Maps virtual entry absolute_path → original source path in pack.
rendered_bytes: HashMap<PathBuf, Arc<[u8]>>Maps virtual entry absolute_path → in-memory rendered bytes.
Populated for every virtual entry the pipeline produces, in
both Active and Passive modes (Passive sources the bytes from
baseline.rendered_content). Handlers that need the rendered
content for sentinel hashing (install, homebrew) consult
this map first and fall back to disk read for non-template
files. Without this, Passive callers — where the rendered
file isn’t on disk — couldn’t produce correct sentinels for
templated install scripts or Brewfiles. See issue #121.
skipped: Vec<SkippedRender>Files whose deployed bytes diverged from the cached baseline and
were therefore preserved instead of being overwritten. Empty
outside of dodot up runs that pass force = false and have a
baseline available. Surfaced to the user as warnings — see
docs/proposals/preprocessing-pipeline.lex §6.4.
Implementations§
Source§impl PreprocessResult
impl PreprocessResult
Sourcepub fn passthrough(entries: Vec<PackEntry>) -> Self
pub fn passthrough(entries: Vec<PackEntry>) -> Self
Create a passthrough result where all entries are regular (no preprocessing).
Sourcepub fn merged_entries(&self) -> Vec<PackEntry>
pub fn merged_entries(&self) -> Vec<PackEntry>
Return all entries (regular + virtual) merged into one list, sorted by relative path.