Skip to content

Commit

Permalink
add source to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Nov 30, 2024
1 parent 7a16c63 commit 5f888f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ pub struct Cache {
/// The prefix that was used at build time (needs to be replaced when
/// restoring the files)
pub prefix: PathBuf,

/// The sources that were already present in the `work_dir`
pub sources: Vec<Source>,
}

impl Output {
Expand Down
6 changes: 5 additions & 1 deletion src/recipe/parser/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ use crate::{
};
use serde::{Deserialize, Serialize};

use super::{Build, Requirements};
use super::{Build, Requirements, Source};

/// A cache build that can be used to split up a build into multiple outputs
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct Cache {
/// Sources that are used in the cache build and subsequent output builds
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub source: Vec<Source>,
/// The build configuration for the cache
pub build: Build,
/// The requirements for building the cache
Expand All @@ -35,6 +38,7 @@ impl TryConvertNode<Cache> for RenderedMappingNode {
validate_keys! {
cache,
self.iter(),
source,
build,
requirements
};
Expand Down

0 comments on commit 5f888f1

Please sign in to comment.