diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-04-20 14:28:05 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-04-20 14:38:17 +0200 |
commit | e9bf0fc40c0eb7e9d4228b804d62f31b0a136528 (patch) | |
tree | 7872f587782d5635eadbf82ae861d474d4da2efe /crates/driver/src/task.rs | |
parent | 35e68444dd5e9d3d5fc39409c48be6eb3fa05e07 (diff) | |
download | rebel-e9bf0fc40c0eb7e9d4228b804d62f31b0a136528.tar rebel-e9bf0fc40c0eb7e9d4228b804d62f31b0a136528.zip |
Rename directories to match crate names
Diffstat (limited to 'crates/driver/src/task.rs')
-rw-r--r-- | crates/driver/src/task.rs | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/crates/driver/src/task.rs b/crates/driver/src/task.rs deleted file mode 100644 index e84766e..0000000 --- a/crates/driver/src/task.rs +++ /dev/null @@ -1,96 +0,0 @@ -use std::collections::{HashMap, HashSet}; - -use serde::Deserialize; - -use common::{string_hash::StringHash, types::TaskID}; - -use crate::{ - args::{ArgMapping, ArgType, TaskArgs}, - recipe, -}; - -#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Hash)] -pub struct TaskDep { - #[serde(flatten, deserialize_with = "recipe::deserialize_task_id")] - pub id: TaskID, - #[serde(default)] - pub args: ArgMapping, -} - -#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Hash)] -pub struct Fetch { - pub name: String, - pub sha256: StringHash, -} - -fn default_output_name() -> String { - "default".to_string() -} - -#[derive(Clone, Debug, Deserialize)] -pub struct ParentDep { - #[serde(flatten)] - pub dep: TaskDep, -} - -#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Hash)] -pub struct OutputDep { - #[serde(flatten)] - pub dep: TaskDep, - #[serde(default)] - pub noinherit: bool, - #[serde(default = "default_output_name")] - pub output: String, -} - -#[derive(Clone, Debug, Deserialize, Default)] -pub struct Output { - pub path: Option<String>, - #[serde(default)] - pub runtime_depends: HashSet<OutputDep>, -} - -#[derive(Clone, Debug, Deserialize, Default)] -pub struct Action { - #[serde(default)] - pub run: String, -} - -impl Action { - pub fn is_empty(&self) -> bool { - self.run.is_empty() - } -} - -#[derive(Clone, Debug, Default)] -pub struct TaskMeta { - pub basename: String, - pub recipename: String, - pub recipe: String, - pub name: String, - pub version: Option<String>, -} - -#[derive(Clone, Debug, Deserialize, Default)] -pub struct TaskDef { - #[serde(skip)] - pub meta: TaskMeta, - #[serde(default)] - pub args: HashMap<String, ArgType>, - #[serde(default)] - pub parent: Option<ParentDep>, - #[serde(default)] - pub fetch: HashSet<Fetch>, - #[serde(default)] - pub build_depends: HashSet<OutputDep>, - #[serde(default)] - pub depends: HashSet<OutputDep>, - #[serde(default)] - pub output: HashMap<String, Output>, - #[serde(flatten)] - pub action: Action, - #[serde(default)] - pub priority: i32, - #[serde(skip)] - pub arg_match: TaskArgs, -} |