diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-08 22:39:15 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-09 09:25:21 +0200 |
commit | 5f44943bb59987181c6381995078d628636d7f52 (patch) | |
tree | 76760f27f3d307f0c62a60ffc821deebac4eae65 /src/executor.rs | |
parent | e85f1ede2cbaff2ca73eec469111a434b4f166b5 (diff) | |
download | rebel-5f44943bb59987181c6381995078d628636d7f52.tar rebel-5f44943bb59987181c6381995078d628636d7f52.zip |
Add layer hash to task output
For now, the hash is not actually computed.
Diffstat (limited to 'src/executor.rs')
-rw-r--r-- | src/executor.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/executor.rs b/src/executor.rs index 993b0e1..ebe90d6 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -9,7 +9,8 @@ use serde::{Deserialize, Serialize}; use crate::{ context::{Context, TaskRef}, - paths, resolve, runner, + paths, resolve, + runner::{self, TaskOutput}, task::*, template::TemplateEngine, types::*, @@ -28,7 +29,7 @@ struct TaskMeta { pub inherit: Vec<InputHash>, pub depends: HashMap<DependencyHash, Dependency>, pub input_hash: InputHash, - pub output: HashMap<String, ArchiveHash>, + pub output: TaskOutput, pub start_time: u64, pub duration: u64, } @@ -146,7 +147,7 @@ impl<'ctx> Executor<'ctx> { ) .expect("invalid runtime depends of build_depends") .iter() - .filter_map(|dep| self.tasks_done[&dep.task].output.get(dep.output)) + .filter_map(|dep| self.tasks_done[&dep.task].output.outputs.get(dep.output)) .map(|&output| Dependency::Task { output, path: "".to_string(), @@ -161,7 +162,7 @@ impl<'ctx> Executor<'ctx> { ) .expect("invalid runtime depends of host_depends") .iter() - .filter_map(|dep| self.tasks_done[&dep.task].output.get(dep.output)) + .filter_map(|dep| self.tasks_done[&dep.task].output.outputs.get(dep.output)) .map(|&output| Dependency::Task { output, path: paths::abs(paths::TASK_SYSROOT), @@ -276,7 +277,7 @@ impl<'ctx> Executor<'ctx> { command, inherit: inherit_chain, depends: task_deps, - output: task_output, + outputs: task_output, }; let input_hash = input_hash(&input); @@ -353,7 +354,7 @@ impl<'ctx> Executor<'ctx> { for (task_ref, task) in &self.tasks_done { println!(); println!("{} ( {} )", task_ref, task.input_hash); - for (output, hash) in &task.output { + for (output, hash) in &task.output.outputs { println!("-> {} ( {} )", output, hash); } } |