Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 67 additions & 3 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7889,7 +7889,7 @@ pub enum WorkspaceCommand {
/// View metadata about the current workspace.
///
/// The output of this command is not yet stable.
Metadata(MetadataArgs),
Metadata(Box<MetadataArgs>),
/// Display the path of a workspace member.
///
/// By default, the path to the workspace root directory is displayed.
Expand All @@ -7903,9 +7903,73 @@ pub enum WorkspaceCommand {
#[command(hide = true)]
List(WorkspaceListArgs),
}
#[derive(Args)]
pub struct MetadataArgs {
/// Check if the lockfile is up-to-date.
///
/// Asserts that the `uv.lock` would remain unchanged after a resolution. If the lockfile is
/// missing or needs to be updated, uv will exit with an error.
///
/// Equivalent to `--locked`.
#[arg(long, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with_all = ["check_exists", "upgrade"], overrides_with = "check")]
pub check: bool,

#[derive(Args, Debug)]
pub struct MetadataArgs;
/// Check if the lockfile is up-to-date [env: UV_LOCKED=]
///
/// Asserts that the `uv.lock` would remain unchanged after a resolution. If the lockfile is
/// missing or needs to be updated, uv will exit with an error.
///
/// Equivalent to `--check`.
#[arg(long, conflicts_with_all = ["check_exists", "upgrade"], hide = true)]
pub locked: bool,

/// Assert that a `uv.lock` exists without checking if it is up-to-date [env: UV_FROZEN=]
///
/// Equivalent to `--frozen`.
#[arg(long, alias = "frozen", conflicts_with_all = ["check", "locked"])]
pub check_exists: bool,

/// Perform a dry run, without writing the lockfile.
///
/// In dry-run mode, uv will resolve the project's dependencies and report on the resulting
/// changes, but will not write the lockfile to disk.
#[arg(
long,
conflicts_with = "check_exists",
conflicts_with = "check",
conflicts_with = "locked"
)]
pub dry_run: bool,

#[command(flatten)]
pub resolver: ResolverArgs,

#[command(flatten)]
pub build: BuildOptionsArgs,

#[command(flatten)]
pub refresh: RefreshArgs,

/// The Python interpreter to use during resolution.
///
/// A Python interpreter is required for building source distributions to determine package
/// metadata when there are not wheels.
///
/// The interpreter is also used as the fallback value for the minimum Python version if
/// `requires-python` is not set.
///
/// See `uv help python` for details on Python discovery and supported request formats.
#[arg(
long,
short,
env = EnvVars::UV_PYTHON,
verbatim_doc_comment,
help_heading = "Python options",
value_parser = parse_maybe_string,
value_hint = ValueHint::Other,
)]
pub python: Option<Maybe<String>>,
}

#[derive(Args, Debug)]
pub struct WorkspaceDirArgs {
Expand Down
1 change: 1 addition & 0 deletions crates/uv-resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ rustc-hash = { workspace = true }
same-file = { workspace = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
smallvec = { workspace = true }
textwrap = { workspace = true }
thiserror = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/uv-resolver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub use exclusions::Exclusions;
pub use flat_index::{FlatDistributions, FlatIndex};
pub use fork_strategy::ForkStrategy;
pub use lock::{
Installable, Lock, LockError, LockVersion, Package, PackageMap, PylockToml,
Installable, Lock, LockError, LockVersion, Metadata, Package, PackageMap, PylockToml,
PylockTomlErrorKind, RequirementsTxtExport, ResolverManifest, SatisfiesResult, TreeDisplay,
VERSION, cyclonedx_json,
};
Expand Down
Loading
Loading