summaryrefslogtreecommitdiffstats
path: root/src/executor.rs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-10-09 10:35:21 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-10-09 10:35:21 +0200
commitd698068afb8a7bad93e683ac3b7897b4c18584ba (patch)
tree3fb08978b8db49f54e70927bf21b2d3254177d81 /src/executor.rs
parent730dfc0968dc1037927877f03ff4b53b00484e49 (diff)
downloadrebel-d698068afb8a7bad93e683ac3b7897b4c18584ba.tar
rebel-d698068afb8a7bad93e683ac3b7897b4c18584ba.zip
Refer to inherited tasks by their layer hash
Diffstat (limited to 'src/executor.rs')
-rw-r--r--src/executor.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/executor.rs b/src/executor.rs
index ebe90d6..6cac288 100644
--- a/src/executor.rs
+++ b/src/executor.rs
@@ -26,7 +26,7 @@ fn input_hash(task: &runner::TaskInput) -> InputHash {
struct TaskMeta {
pub id: TaskID,
pub args: HashMap<String, serde_json::Value>,
- pub inherit: Vec<InputHash>,
+ pub inherit: Vec<LayerHash>,
pub depends: HashMap<DependencyHash, Dependency>,
pub input_hash: InputHash,
pub output: TaskOutput,
@@ -259,7 +259,11 @@ impl<'ctx> Executor<'ctx> {
.expect("invalid inherit depends")
.map(|inherit_dep| {
let inherit_meta = &self.tasks_done[&inherit_dep];
- [inherit_meta.inherit.as_slice(), &[inherit_meta.input_hash]].concat()
+ [
+ inherit_meta.inherit.as_slice(),
+ &[inherit_meta.output.layer],
+ ]
+ .concat()
})
.unwrap_or_default();