From 80914f3015bedc198bb1ee072ba6c3ead25a90c2 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 2 Jan 2025 18:43:00 -0800 Subject: [PATCH] chore: Omit serde/serde_json from lockfiles not using cargo_metadata --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5ccdeb7..ae59e09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,7 +113,7 @@ pre-release-replacements = [ [features] default = ["clap"] clap = ["dep:clap"] -cargo_metadata = ["dep:cargo_metadata"] +cargo_metadata = ["dep:cargo_metadata", "dep:serde", "dep:serde_json"] [dependencies] anstyle = "1.0.3" @@ -121,8 +121,8 @@ cargo_metadata = { version = "0.19", optional = true } clap = { version = "4.4.1", default-features = false, features = ["std", "derive"], optional = true } [target.'cfg(any())'.dependencies] -serde = "1.0.210" # HACK: bad minimal dep in cargo_metadata -serde_json = "1.0.133" # HACK: bad minimal dep in cargo_metadata +serde = { version = "1.0.210", optional = true } # HACK: bad minimal dep in cargo_metadata +serde_json = { version = "1.0.133", optional = true } # HACK: bad minimal dep in cargo_metadata [[example]] name = "flags"