Skip to content

Commit

Permalink
Recursive Dependencies (#136)
Browse files Browse the repository at this point in the history
* When installing a dependency, we have a new option called recursiv-deps which can install the dependencies of that dependency recursively
  • Loading branch information
mario-eth committed Aug 9, 2024
1 parent baad1bf commit bff8d53
Show file tree
Hide file tree
Showing 7 changed files with 191 additions and 65 deletions.
14 changes: 12 additions & 2 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,27 @@ pub struct Install {
pub rev: Option<String>,

/// If set, this command will delete the existing remappings and re-create them
#[arg(long, default_value_t = false)]
#[arg(short = 'g', long, default_value_t = false)]
pub regenerate_remappings: bool,

/// If set, this command will install the recursive dependencies (via submodules or via
/// soldeer)
#[arg(short = 'd', long, default_value_t = false)]
pub recursive_deps: bool,
}

/// Update dependencies by reading the config file
#[derive(Debug, Clone, Parser)]
#[clap(after_help = "For more information, read the README.md")]
pub struct Update {
/// If set, this command will delete the existing remappings and re-create them
#[arg(long, default_value_t = false)]
#[arg(short = 'g', long, default_value_t = false)]
pub regenerate_remappings: bool,

/// If set, this command will install the recursive dependencies (via submodules or via
/// soldeer)
#[arg(short = 'd', long, default_value_t = false)]
pub recursive_deps: bool,
}

/// Display the version of Soldeer
Expand Down
4 changes: 4 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ pub struct SoldeerConfig {

#[serde(default)]
pub remappings_location: RemappingsLocation,

#[serde(default)]
pub recursive_deps: bool,
}

impl Default for SoldeerConfig {
Expand All @@ -56,6 +59,7 @@ impl Default for SoldeerConfig {
remappings_version: true,
remappings_prefix: String::new(),
remappings_location: Default::default(),
recursive_deps: false,
}
}
}
Expand Down
Loading

0 comments on commit bff8d53

Please sign in to comment.