From a6e2689a723bdc8173868092f33491e78fdf3f4a Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 4 Apr 2025 08:50:53 -0400 Subject: [PATCH] Make --frozen and --no-sources conflicting options --- crates/uv-cli/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 68d8a4d0defe7..3866e0d5754fa 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -2959,7 +2959,7 @@ pub struct RunArgs { /// source of truth. If the lockfile is missing, uv will exit with an error. If the /// `pyproject.toml` includes changes to dependencies that have not been included in the /// lockfile yet, they will not be present in the environment. - #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "locked")] + #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with_all = ["locked", "upgrade", "no_sources"])] pub frozen: bool, /// Run the given path as a Python script. @@ -3207,7 +3207,7 @@ pub struct SyncArgs { /// source of truth. If the lockfile is missing, uv will exit with an error. If the /// `pyproject.toml` includes changes to dependencies that have not been included in the /// lockfile yet, they will not be present in the environment. - #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "locked")] + #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with_all = ["locked", "upgrade", "no_sources"])] pub frozen: bool, /// Perform a dry run, without writing the lockfile or modifying the project environment. @@ -3461,7 +3461,7 @@ pub struct AddArgs { /// Add dependencies without re-locking the project. /// /// The project environment will not be synced. - #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "locked")] + #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with_all = ["locked", "upgrade", "no_sources"])] pub frozen: bool, /// Prefer the active virtual environment over the project's virtual environment. @@ -3566,7 +3566,7 @@ pub struct RemoveArgs { /// Remove dependencies without re-locking the project. /// /// The project environment will not be synced. - #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "locked")] + #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with_all = ["locked", "upgrade", "no_sources"])] pub frozen: bool, #[command(flatten)] @@ -3688,7 +3688,7 @@ pub struct TreeArgs { /// Display the requirements without locking the project. /// /// If the lockfile is missing, uv will exit with an error. - #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "locked")] + #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with_all = ["locked", "upgrade", "no_sources"])] pub frozen: bool, #[command(flatten)] @@ -3915,7 +3915,7 @@ pub struct ExportArgs { /// Do not update the `uv.lock` before exporting. /// /// If a `uv.lock` does not exist, uv will exit with an error. - #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "locked")] + #[arg(long, env = EnvVars::UV_FROZEN, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with_all = ["locked", "upgrade", "no_sources"])] pub frozen: bool, #[command(flatten)]