Skip to main content

write_set

Function write_set 

Source
pub fn write_set(
    plan: &DeployPlanResult,
    declared: &Declared,
) -> Result<WriteSet, CoreError>
Expand description

The write set of plan (research Pattern 3).

Every rendered file of every added or changed unit is written, whole units and never a partial one; same and unmanaged units are never written. The deletes are the plan’s delete set. Each touched path carries the hash the plan saw in the collection it is written to or deleted from: for a bare (mode) path, live_sha256 where the entry is live in mode, else none (a copy that only core holds is not a file of the mode collection); for a .core/ path (quick 261102-cef, P6), the row’s live_sha256, the core copy’s hash, or none where core lacks it. The bytes of a .core/ write are the render’s at its collection path. A delete without such a hash, or a rendered file whose bytes are not the ones the plan hashed, is a defect, reported as CoreError::Internal.