diff --git a/crates/uv-configuration/src/dry_run.rs b/crates/uv-configuration/src/dry_run.rs new file mode 100644 index 000000000..528e31654 --- /dev/null +++ b/crates/uv-configuration/src/dry_run.rs @@ -0,0 +1,24 @@ +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub enum DryRun { + /// The operation should execute in dry run mode. + Enabled, + /// The operation should execute in normal mode. + #[default] + Disabled, +} + +impl DryRun { + /// Determine the [`DryRun`] setting based on the command-line arguments. + pub fn from_args(dry_run: bool) -> Self { + if dry_run { + DryRun::Enabled + } else { + DryRun::Disabled + } + } + + /// Returns `true` if dry run mode is enabled. + pub const fn enabled(&self) -> bool { + matches!(self, DryRun::Enabled) + } +} diff --git a/crates/uv-configuration/src/lib.rs b/crates/uv-configuration/src/lib.rs index 711fc9c19..3220f33a3 100644 --- a/crates/uv-configuration/src/lib.rs +++ b/crates/uv-configuration/src/lib.rs @@ -4,6 +4,7 @@ pub use concurrency::*; pub use config_settings::*; pub use constraints::*; pub use dev::*; +pub use dry_run::*; pub use editable::*; pub use export_format::*; pub use extras::*; @@ -28,6 +29,7 @@ mod concurrency; mod config_settings; mod constraints; mod dev; +mod dry_run; mod editable; mod export_format; mod extras; diff --git a/crates/uv/src/commands/pip/install.rs b/crates/uv/src/commands/pip/install.rs index 9fb6d8cfd..525074f65 100644 --- a/crates/uv/src/commands/pip/install.rs +++ b/crates/uv/src/commands/pip/install.rs @@ -9,7 +9,7 @@ use tracing::{debug, enabled, Level}; use uv_cache::Cache; use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ - BuildOptions, Concurrency, ConfigSettings, Constraints, DevGroupsSpecification, + BuildOptions, Concurrency, ConfigSettings, Constraints, DevGroupsSpecification, DryRun, ExtrasSpecification, HashCheckingMode, IndexStrategy, PreviewMode, Reinstall, SourceStrategy, TrustedHost, Upgrade, }; @@ -87,7 +87,7 @@ pub(crate) async fn pip_install( native_tls: bool, allow_insecure_host: &[TrustedHost], cache: Cache, - dry_run: bool, + dry_run: DryRun, printer: Printer, preview: PreviewMode, ) -> anyhow::Result { @@ -247,7 +247,7 @@ pub(crate) async fn pip_install( } } DefaultInstallLogger.on_audit(requirements.len(), start, printer)?; - if dry_run { + if dry_run.enabled() { writeln!(printer.stderr(), "Would make no changes")?; } @@ -480,7 +480,7 @@ pub(crate) async fn pip_install( operations::diagnose_resolution(resolution.diagnostics(), printer)?; // Notify the user of any environment diagnostics. - if strict && !dry_run { + if strict && !dry_run.enabled() { operations::diagnose_environment(&resolution, &environment, &marker_env, printer)?; } diff --git a/crates/uv/src/commands/pip/operations.rs b/crates/uv/src/commands/pip/operations.rs index 113167063..fea6b437a 100644 --- a/crates/uv/src/commands/pip/operations.rs +++ b/crates/uv/src/commands/pip/operations.rs @@ -13,7 +13,7 @@ use uv_tool::InstalledTools; use uv_cache::Cache; use uv_client::{BaseClientBuilder, RegistryClient}; use uv_configuration::{ - BuildOptions, Concurrency, ConfigSettings, Constraints, DevGroupsSpecification, + BuildOptions, Concurrency, ConfigSettings, Constraints, DevGroupsSpecification, DryRun, ExtrasSpecification, Overrides, Reinstall, Upgrade, }; use uv_dispatch::BuildDispatch; @@ -418,7 +418,7 @@ pub(crate) async fn install( venv: &PythonEnvironment, logger: Box, installer_metadata: bool, - dry_run: bool, + dry_run: DryRun, printer: Printer, ) -> Result { let start = std::time::Instant::now(); @@ -439,7 +439,7 @@ pub(crate) async fn install( ) .context("Failed to determine installation plan")?; - if dry_run { + if dry_run.enabled() { report_dry_run(resolution, plan, modifications, start, printer)?; return Ok(Changelog::default()); } diff --git a/crates/uv/src/commands/pip/sync.rs b/crates/uv/src/commands/pip/sync.rs index 13d1bd0db..e96ecdbae 100644 --- a/crates/uv/src/commands/pip/sync.rs +++ b/crates/uv/src/commands/pip/sync.rs @@ -9,7 +9,7 @@ use tracing::debug; use uv_cache::Cache; use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ - BuildOptions, Concurrency, ConfigSettings, Constraints, DevGroupsSpecification, + BuildOptions, Concurrency, ConfigSettings, Constraints, DevGroupsSpecification, DryRun, ExtrasSpecification, HashCheckingMode, IndexStrategy, PreviewMode, Reinstall, SourceStrategy, TrustedHost, Upgrade, }; @@ -75,7 +75,7 @@ pub(crate) async fn pip_sync( native_tls: bool, allow_insecure_host: &[TrustedHost], cache: Cache, - dry_run: bool, + dry_run: DryRun, printer: Printer, preview: PreviewMode, ) -> Result { @@ -425,7 +425,7 @@ pub(crate) async fn pip_sync( operations::diagnose_resolution(resolution.diagnostics(), printer)?; // Notify the user of any environment diagnostics. - if strict && !dry_run { + if strict && !dry_run.enabled() { operations::diagnose_environment(&resolution, &environment, &marker_env, printer)?; } diff --git a/crates/uv/src/commands/pip/uninstall.rs b/crates/uv/src/commands/pip/uninstall.rs index 4a7b63778..effb0db54 100644 --- a/crates/uv/src/commands/pip/uninstall.rs +++ b/crates/uv/src/commands/pip/uninstall.rs @@ -7,7 +7,7 @@ use tracing::debug; use uv_cache::Cache; use uv_client::{BaseClientBuilder, Connectivity}; -use uv_configuration::{KeyringProviderType, TrustedHost}; +use uv_configuration::{DryRun, KeyringProviderType, TrustedHost}; use uv_distribution_types::{InstalledMetadata, Name, UnresolvedRequirement}; use uv_fs::Simplified; use uv_pep508::UnnamedRequirement; @@ -36,7 +36,7 @@ pub(crate) async fn pip_uninstall( native_tls: bool, keyring_provider: KeyringProviderType, allow_insecure_host: &[TrustedHost], - dry_run: bool, + dry_run: DryRun, printer: Printer, ) -> Result { let start = std::time::Instant::now(); @@ -144,7 +144,7 @@ pub(crate) async fn pip_uninstall( for package in &names { let installed = site_packages.get_packages(package); if installed.is_empty() { - if !dry_run { + if !dry_run.enabled() { writeln!( printer.stderr(), "{}{} Skipping {} as it is not installed", @@ -162,7 +162,7 @@ pub(crate) async fn pip_uninstall( for url in &urls { let installed = site_packages.get_urls(url); if installed.is_empty() { - if !dry_run { + if !dry_run.enabled() { writeln!( printer.stderr(), "{}{} Skipping {} as it is not installed", @@ -183,7 +183,7 @@ pub(crate) async fn pip_uninstall( }; if distributions.is_empty() { - if dry_run { + if dry_run.enabled() { writeln!(printer.stderr(), "Would make no changes")?; } else { writeln!( @@ -197,7 +197,7 @@ pub(crate) async fn pip_uninstall( } // Uninstall each package. - if !dry_run { + if !dry_run.enabled() { for distribution in &distributions { let summary = uv_installer::uninstall(distribution).await?; debug!( @@ -213,7 +213,7 @@ pub(crate) async fn pip_uninstall( let uninstalls = distributions.len(); let s = if uninstalls == 1 { "" } else { "s" }; - if dry_run { + if dry_run.enabled() { writeln!( printer.stderr(), "{}", diff --git a/crates/uv/src/commands/project/add.rs b/crates/uv/src/commands/project/add.rs index 03af8c934..81f316a79 100644 --- a/crates/uv/src/commands/project/add.rs +++ b/crates/uv/src/commands/project/add.rs @@ -16,8 +16,8 @@ use uv_cache::Cache; use uv_cache_key::RepositoryUrl; use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ - Concurrency, Constraints, DevGroupsSpecification, DevMode, EditableMode, ExtrasSpecification, - InstallOptions, PreviewMode, SourceStrategy, TrustedHost, + Concurrency, Constraints, DevGroupsSpecification, DevMode, DryRun, EditableMode, + ExtrasSpecification, InstallOptions, PreviewMode, SourceStrategy, TrustedHost, }; use uv_dispatch::BuildDispatch; use uv_distribution::DistributionDatabase; @@ -235,7 +235,7 @@ pub(crate) async fn add( no_config, active, cache, - false, + DryRun::Disabled, printer, ) .await? @@ -882,7 +882,7 @@ async fn lock_and_sync( native_tls, allow_insecure_host, cache, - false, + DryRun::Disabled, printer, preview, ) diff --git a/crates/uv/src/commands/project/lock.rs b/crates/uv/src/commands/project/lock.rs index 12504f26d..f613c3ceb 100644 --- a/crates/uv/src/commands/project/lock.rs +++ b/crates/uv/src/commands/project/lock.rs @@ -12,8 +12,8 @@ use tracing::debug; use uv_cache::Cache; use uv_client::{Connectivity, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ - Concurrency, Constraints, DevGroupsSpecification, ExtrasSpecification, PreviewMode, Reinstall, - TrustedHost, Upgrade, + Concurrency, Constraints, DevGroupsSpecification, DryRun, ExtrasSpecification, PreviewMode, + Reinstall, TrustedHost, Upgrade, }; use uv_dispatch::BuildDispatch; use uv_distribution::DistributionDatabase; @@ -79,7 +79,7 @@ pub(crate) async fn lock( project_dir: &Path, locked: bool, frozen: bool, - dry_run: bool, + dry_run: DryRun, python: Option, install_mirrors: PythonInstallMirrors, settings: ResolverSettings, @@ -146,7 +146,7 @@ pub(crate) async fn lock( if locked { LockMode::Locked(&interpreter) - } else if dry_run { + } else if dry_run.enabled() { LockMode::DryRun(&interpreter) } else { LockMode::Write(&interpreter) @@ -174,7 +174,7 @@ pub(crate) async fn lock( .await { Ok(lock) => { - if dry_run { + if dry_run.enabled() { // In `--dry-run` mode, show all changes. let mut changed = false; if let LockResult::Changed(previous, lock) = &lock { @@ -1081,13 +1081,13 @@ impl ValidatedLock { #[derive(Debug, Clone)] pub(crate) enum LockEvent<'lock> { Update( - bool, + DryRun, PackageName, BTreeSet>, BTreeSet>, ), - Add(bool, PackageName, BTreeSet>), - Remove(bool, PackageName, BTreeSet>), + Add(DryRun, PackageName, BTreeSet>), + Remove(DryRun, PackageName, BTreeSet>), } impl<'lock> LockEvent<'lock> { @@ -1095,7 +1095,7 @@ impl<'lock> LockEvent<'lock> { pub(crate) fn detect_changes( existing_lock: Option<&'lock Lock>, new_lock: &'lock Lock, - dry_run: bool, + dry_run: DryRun, ) -> impl Iterator { // Identify the package-versions in the existing lockfile. let mut existing_packages: FxHashMap<&PackageName, BTreeSet>> = @@ -1180,7 +1180,13 @@ impl std::fmt::Display for LockEvent<'_> { write!( f, "{} {name} {existing_versions} -> {new_versions}", - if *dry_run { "Update" } else { "Updated" }.green().bold() + if dry_run.enabled() { + "Update" + } else { + "Updated" + } + .green() + .bold() ) } Self::Add(dry_run, name, new_versions) => { @@ -1193,7 +1199,9 @@ impl std::fmt::Display for LockEvent<'_> { write!( f, "{} {name} {new_versions}", - if *dry_run { "Add" } else { "Added" }.green().bold() + if dry_run.enabled() { "Add" } else { "Added" } + .green() + .bold() ) } Self::Remove(dry_run, name, existing_versions) => { @@ -1206,7 +1214,13 @@ impl std::fmt::Display for LockEvent<'_> { write!( f, "{} {name} {existing_versions}", - if *dry_run { "Remove" } else { "Removed" }.red().bold() + if dry_run.enabled() { + "Remove" + } else { + "Removed" + } + .red() + .bold() ) } } diff --git a/crates/uv/src/commands/project/mod.rs b/crates/uv/src/commands/project/mod.rs index a0c34c3b3..f872a691a 100644 --- a/crates/uv/src/commands/project/mod.rs +++ b/crates/uv/src/commands/project/mod.rs @@ -11,8 +11,8 @@ use uv_cache::Cache; use uv_cache_key::cache_digest; use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ - Concurrency, Constraints, DevGroupsManifest, DevGroupsSpecification, ExtrasSpecification, - PreviewMode, Reinstall, TrustedHost, Upgrade, + Concurrency, Constraints, DevGroupsManifest, DevGroupsSpecification, DryRun, + ExtrasSpecification, PreviewMode, Reinstall, TrustedHost, Upgrade, }; use uv_dispatch::{BuildDispatch, SharedState}; use uv_distribution::DistributionDatabase; @@ -962,7 +962,7 @@ impl ProjectEnvironment { no_config: bool, active: Option, cache: &Cache, - dry_run: bool, + dry_run: DryRun, printer: Printer, ) -> Result { // Lock the project environment to avoid synchronization issues. @@ -1020,7 +1020,7 @@ impl ProjectEnvironment { }; // Under `--dry-run`, avoid modifying the environment. - if dry_run { + if dry_run.enabled() { let environment = PythonEnvironment::from_interpreter(interpreter); return Ok(if replace { Self::Replaced(environment, venv) @@ -1508,7 +1508,7 @@ pub(crate) async fn sync_environment( // optional on the downstream APIs. let build_constraints = Constraints::default(); let build_hasher = HashStrategy::default(); - let dry_run = false; + let dry_run = DryRun::default(); let hasher = HashStrategy::default(); // Resolve the flat indexes from `--find-links`. @@ -1715,7 +1715,7 @@ pub(crate) async fn update_environment( // optional on the downstream APIs. let build_constraints = Constraints::default(); let build_hasher = HashStrategy::default(); - let dry_run = false; + let dry_run = DryRun::default(); let extras = ExtrasSpecification::default(); let groups = DevGroupsSpecification::default(); let hasher = HashStrategy::default(); diff --git a/crates/uv/src/commands/project/remove.rs b/crates/uv/src/commands/project/remove.rs index 079602d6b..6e1df097d 100644 --- a/crates/uv/src/commands/project/remove.rs +++ b/crates/uv/src/commands/project/remove.rs @@ -10,7 +10,7 @@ use tracing::debug; use uv_cache::Cache; use uv_client::Connectivity; use uv_configuration::{ - Concurrency, DevGroupsSpecification, EditableMode, ExtrasSpecification, InstallOptions, + Concurrency, DevGroupsSpecification, DryRun, EditableMode, ExtrasSpecification, InstallOptions, PreviewMode, TrustedHost, }; use uv_fs::Simplified; @@ -233,7 +233,7 @@ pub(crate) async fn remove( no_config, active, cache, - false, + DryRun::Disabled, printer, ) .await? @@ -349,7 +349,7 @@ pub(crate) async fn remove( native_tls, allow_insecure_host, cache, - false, + DryRun::Disabled, printer, preview, ) diff --git a/crates/uv/src/commands/project/run.rs b/crates/uv/src/commands/project/run.rs index b45156f36..6729466f5 100644 --- a/crates/uv/src/commands/project/run.rs +++ b/crates/uv/src/commands/project/run.rs @@ -17,7 +17,7 @@ use uv_cache::Cache; use uv_cli::ExternalCommand; use uv_client::{BaseClientBuilder, Connectivity}; use uv_configuration::{ - Concurrency, DevGroupsSpecification, EditableMode, ExtrasSpecification, InstallOptions, + Concurrency, DevGroupsSpecification, DryRun, EditableMode, ExtrasSpecification, InstallOptions, PreviewMode, SourceStrategy, TrustedHost, }; use uv_distribution::LoweredRequirement; @@ -652,7 +652,7 @@ pub(crate) async fn run( no_config, active, cache, - false, + DryRun::Disabled, printer, ) .await? @@ -799,7 +799,7 @@ pub(crate) async fn run( native_tls, allow_insecure_host, cache, - false, + DryRun::Disabled, printer, preview, ) diff --git a/crates/uv/src/commands/project/sync.rs b/crates/uv/src/commands/project/sync.rs index ea3a097de..41ff4889f 100644 --- a/crates/uv/src/commands/project/sync.rs +++ b/crates/uv/src/commands/project/sync.rs @@ -9,7 +9,7 @@ use owo_colors::OwoColorize; use uv_cache::Cache; use uv_client::{Connectivity, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ - Concurrency, Constraints, DevGroupsManifest, DevGroupsSpecification, EditableMode, + Concurrency, Constraints, DevGroupsManifest, DevGroupsSpecification, DryRun, EditableMode, ExtrasSpecification, HashCheckingMode, InstallOptions, PreviewMode, TrustedHost, }; use uv_dispatch::BuildDispatch; @@ -49,7 +49,7 @@ pub(crate) async fn sync( project_dir: &Path, locked: bool, frozen: bool, - dry_run: bool, + dry_run: DryRun, active: Option, all_packages: bool, package: Option, @@ -139,7 +139,7 @@ pub(crate) async fn sync( .await? { ProjectEnvironment::Existing(environment) => { - if dry_run { + if dry_run.enabled() { writeln!( printer.stderr(), "{}", @@ -153,7 +153,7 @@ pub(crate) async fn sync( environment } ProjectEnvironment::Replaced(environment, root) => { - if dry_run { + if dry_run.enabled() { writeln!( printer.stderr(), "{}", @@ -167,7 +167,7 @@ pub(crate) async fn sync( environment } ProjectEnvironment::New(environment, root) => { - if dry_run { + if dry_run.enabled() { writeln!( printer.stderr(), "{}", @@ -190,7 +190,7 @@ pub(crate) async fn sync( LockMode::Frozen } else if locked { LockMode::Locked(environment.interpreter()) - } else if dry_run { + } else if dry_run.enabled() { LockMode::DryRun(environment.interpreter()) } else { LockMode::Write(environment.interpreter()) @@ -215,7 +215,7 @@ pub(crate) async fn sync( .await { Ok(result) => { - if dry_run { + if dry_run.enabled() { match result { LockResult::Unchanged(..) => { writeln!( @@ -364,7 +364,7 @@ pub(super) async fn do_sync( native_tls: bool, allow_insecure_host: &[TrustedHost], cache: &Cache, - dry_run: bool, + dry_run: DryRun, printer: Printer, preview: PreviewMode, ) -> Result<(), ProjectError> { diff --git a/crates/uv/src/settings.rs b/crates/uv/src/settings.rs index cf502379f..6d108ee97 100644 --- a/crates/uv/src/settings.rs +++ b/crates/uv/src/settings.rs @@ -22,10 +22,11 @@ use uv_cli::{ }; use uv_client::Connectivity; use uv_configuration::{ - BuildOptions, Concurrency, ConfigSettings, DevGroupsSpecification, EditableMode, ExportFormat, - ExtrasSpecification, HashCheckingMode, IndexStrategy, InstallOptions, KeyringProviderType, - NoBinary, NoBuild, PreviewMode, ProjectBuildBackend, Reinstall, RequiredVersion, - SourceStrategy, TargetTriple, TrustedHost, TrustedPublishing, Upgrade, VersionControlSystem, + BuildOptions, Concurrency, ConfigSettings, DevGroupsSpecification, DryRun, EditableMode, + ExportFormat, ExtrasSpecification, HashCheckingMode, IndexStrategy, InstallOptions, + KeyringProviderType, NoBinary, NoBuild, PreviewMode, ProjectBuildBackend, Reinstall, + RequiredVersion, SourceStrategy, TargetTriple, TrustedHost, TrustedPublishing, Upgrade, + VersionControlSystem, }; use uv_distribution_types::{DependencyMetadata, Index, IndexLocations, IndexUrl}; use uv_install_wheel::LinkMode; @@ -957,7 +958,7 @@ impl PythonPinSettings { pub(crate) struct SyncSettings { pub(crate) locked: bool, pub(crate) frozen: bool, - pub(crate) dry_run: bool, + pub(crate) dry_run: DryRun, pub(crate) active: Option, pub(crate) extras: ExtrasSpecification, pub(crate) dev: DevGroupsSpecification, @@ -1020,7 +1021,7 @@ impl SyncSettings { Self { locked, frozen, - dry_run, + dry_run: DryRun::from_args(dry_run), active: flag(active, no_active), extras: ExtrasSpecification::from_args( flag(all_extras, no_all_extras).unwrap_or_default(), @@ -1064,7 +1065,7 @@ impl SyncSettings { pub(crate) struct LockSettings { pub(crate) locked: bool, pub(crate) frozen: bool, - pub(crate) dry_run: bool, + pub(crate) dry_run: DryRun, pub(crate) script: Option, pub(crate) python: Option, pub(crate) install_mirrors: PythonInstallMirrors, @@ -1095,7 +1096,7 @@ impl LockSettings { Self { locked: check, frozen: check_exists, - dry_run, + dry_run: DryRun::from_args(dry_run), script, python: python.and_then(Maybe::into_option), refresh: Refresh::from(refresh), @@ -1679,7 +1680,7 @@ pub(crate) struct PipSyncSettings { pub(crate) src_file: Vec, pub(crate) constraints: Vec, pub(crate) build_constraints: Vec, - pub(crate) dry_run: bool, + pub(crate) dry_run: DryRun, pub(crate) refresh: Refresh, pub(crate) settings: PipSettings, } @@ -1728,7 +1729,7 @@ impl PipSyncSettings { .into_iter() .filter_map(Maybe::into_option) .collect(), - dry_run, + dry_run: DryRun::from_args(dry_run), refresh: Refresh::from(refresh), settings: PipSettings::combine( PipOptions { @@ -1767,7 +1768,7 @@ pub(crate) struct PipInstallSettings { pub(crate) constraints: Vec, pub(crate) overrides: Vec, pub(crate) build_constraints: Vec, - pub(crate) dry_run: bool, + pub(crate) dry_run: DryRun, pub(crate) constraints_from_workspace: Vec, pub(crate) overrides_from_workspace: Vec, pub(crate) modifications: Modifications, @@ -1861,7 +1862,7 @@ impl PipInstallSettings { .into_iter() .filter_map(Maybe::into_option) .collect(), - dry_run, + dry_run: DryRun::from_args(dry_run), constraints_from_workspace, overrides_from_workspace, modifications: if flag(exact, inexact).unwrap_or(false) { @@ -1902,7 +1903,7 @@ impl PipInstallSettings { pub(crate) struct PipUninstallSettings { pub(crate) package: Vec, pub(crate) requirements: Vec, - pub(crate) dry_run: bool, + pub(crate) dry_run: DryRun, pub(crate) settings: PipSettings, } @@ -1927,7 +1928,7 @@ impl PipUninstallSettings { Self { package, requirements, - dry_run, + dry_run: DryRun::from_args(dry_run), settings: PipSettings::combine( PipOptions { python: python.and_then(Maybe::into_option), diff --git a/crates/uv/tests/it/show_settings.rs b/crates/uv/tests/it/show_settings.rs index f43a16006..cf05fc61b 100644 --- a/crates/uv/tests/it/show_settings.rs +++ b/crates/uv/tests/it/show_settings.rs @@ -5595,7 +5595,7 @@ fn verify_hashes() -> anyhow::Result<()> { uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) .arg("-r") .arg("requirements.in") - .arg("--show-settings"), @r#" + .arg("--show-settings"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -5634,7 +5634,7 @@ fn verify_hashes() -> anyhow::Result<()> { constraints: [], overrides: [], build_constraints: [], - dry_run: false, + dry_run: Disabled, constraints_from_workspace: [], overrides_from_workspace: [], modifications: Sufficient, @@ -5730,14 +5730,14 @@ fn verify_hashes() -> anyhow::Result<()> { } ----- stderr ----- - "# + "### ); uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) .arg("-r") .arg("requirements.in") .arg("--no-verify-hashes") - .arg("--show-settings"), @r#" + .arg("--show-settings"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -5776,7 +5776,7 @@ fn verify_hashes() -> anyhow::Result<()> { constraints: [], overrides: [], build_constraints: [], - dry_run: false, + dry_run: Disabled, constraints_from_workspace: [], overrides_from_workspace: [], modifications: Sufficient, @@ -5870,14 +5870,14 @@ fn verify_hashes() -> anyhow::Result<()> { } ----- stderr ----- - "# + "### ); uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) .arg("-r") .arg("requirements.in") .arg("--require-hashes") - .arg("--show-settings"), @r#" + .arg("--show-settings"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -5916,7 +5916,7 @@ fn verify_hashes() -> anyhow::Result<()> { constraints: [], overrides: [], build_constraints: [], - dry_run: false, + dry_run: Disabled, constraints_from_workspace: [], overrides_from_workspace: [], modifications: Sufficient, @@ -6012,14 +6012,14 @@ fn verify_hashes() -> anyhow::Result<()> { } ----- stderr ----- - "# + "### ); uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) .arg("-r") .arg("requirements.in") .arg("--no-require-hashes") - .arg("--show-settings"), @r#" + .arg("--show-settings"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -6058,7 +6058,7 @@ fn verify_hashes() -> anyhow::Result<()> { constraints: [], overrides: [], build_constraints: [], - dry_run: false, + dry_run: Disabled, constraints_from_workspace: [], overrides_from_workspace: [], modifications: Sufficient, @@ -6152,14 +6152,14 @@ fn verify_hashes() -> anyhow::Result<()> { } ----- stderr ----- - "# + "### ); uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) .arg("-r") .arg("requirements.in") .env(EnvVars::UV_NO_VERIFY_HASHES, "1") - .arg("--show-settings"), @r#" + .arg("--show-settings"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -6198,7 +6198,7 @@ fn verify_hashes() -> anyhow::Result<()> { constraints: [], overrides: [], build_constraints: [], - dry_run: false, + dry_run: Disabled, constraints_from_workspace: [], overrides_from_workspace: [], modifications: Sufficient, @@ -6292,7 +6292,7 @@ fn verify_hashes() -> anyhow::Result<()> { } ----- stderr ----- - "# + "### ); uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) @@ -6300,7 +6300,7 @@ fn verify_hashes() -> anyhow::Result<()> { .arg("requirements.in") .arg("--verify-hashes") .arg("--no-require-hashes") - .arg("--show-settings"), @r#" + .arg("--show-settings"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -6339,7 +6339,7 @@ fn verify_hashes() -> anyhow::Result<()> { constraints: [], overrides: [], build_constraints: [], - dry_run: false, + dry_run: Disabled, constraints_from_workspace: [], overrides_from_workspace: [], modifications: Sufficient, @@ -6435,7 +6435,7 @@ fn verify_hashes() -> anyhow::Result<()> { } ----- stderr ----- - "# + "### ); Ok(())