Skip to content

Commit 671003a

Browse files
authored
[esp-metadata] Make clap dependency optional (#2055)
1 parent 5802227 commit 671003a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

esp-metadata/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0"
99

1010
[dependencies]
1111
anyhow = "1.0.86"
12-
clap = { version = "4.5.16", features = ["derive"] }
12+
clap = { version = "4.5.16", features = ["derive"], optional = true }
1313
basic-toml = "0.1.9"
1414
lazy_static = "1.5.0"
1515
serde = { version = "1.0.209", features = ["derive"] }

esp-metadata/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ pub enum Cores {
8888
strum::EnumIter,
8989
strum::EnumString,
9090
strum::AsRefStr,
91-
clap::ValueEnum,
9291
)]
92+
#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9393
#[serde(rename_all = "kebab-case")]
9494
#[strum(serialize_all = "kebab-case")]
9595
pub enum Chip {

xtask/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ semver = { version = "1.0.23", features = ["serde"] }
1717
serde = { version = "1.0.203", features = ["derive"] }
1818
strum = { version = "0.26.2", features = ["derive"] }
1919
toml_edit = "0.22.13"
20-
esp-metadata = { path = "../esp-metadata" }
20+
esp-metadata = { path = "../esp-metadata", features = ["clap"] }

0 commit comments

Comments
 (0)