diff --git a/crates/uv/src/commands/diagnostics.rs b/crates/uv/src/commands/diagnostics.rs index befe12ea0bd8..9a63542845cc 100644 --- a/crates/uv/src/commands/diagnostics.rs +++ b/crates/uv/src/commands/diagnostics.rs @@ -20,8 +20,8 @@ static SUGGESTIONS: LazyLock> = LazyLock::ne .collect() }); -/// Render a [`uv_resolver::ResolveError::DownloadAndBuild`] with a help message. -pub(crate) fn fetch_and_build(sdist: Box, cause: uv_distribution::Error) { +/// Render a remote source distribution build failure with a help message. +pub(crate) fn download_and_build(sdist: Box, cause: uv_distribution::Error) { #[derive(Debug, miette::Diagnostic, thiserror::Error)] #[error("Failed to download and build `{sdist}`")] #[diagnostic()] @@ -48,7 +48,7 @@ pub(crate) fn fetch_and_build(sdist: Box, cause: uv_distribution::Er anstream::eprint!("{report:?}"); } -/// Render a [`uv_resolver::ResolveError::Build`] with a help message. +/// Render a local source distribution build failure with a help message. pub(crate) fn build(sdist: Box, cause: uv_distribution::Error) { #[derive(Debug, miette::Diagnostic, thiserror::Error)] #[error("Failed to build `{sdist}`")] diff --git a/crates/uv/src/commands/pip/compile.rs b/crates/uv/src/commands/pip/compile.rs index 63f772e2c67e..17a7c34f10bb 100644 --- a/crates/uv/src/commands/pip/compile.rs +++ b/crates/uv/src/commands/pip/compile.rs @@ -411,7 +411,7 @@ pub(crate) async fn pip_compile( return Ok(ExitStatus::Failure); } Err(operations::Error::Resolve(uv_resolver::ResolveError::DownloadAndBuild(dist, err))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(operations::Error::Resolve(uv_resolver::ResolveError::Build(dist, err))) => { @@ -422,7 +422,7 @@ pub(crate) async fn pip_compile( dist, err, ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(operations::Error::Requirements(uv_requirements::Error::Build(dist, err))) => { diff --git a/crates/uv/src/commands/pip/install.rs b/crates/uv/src/commands/pip/install.rs index bc1a49002679..1e146e9f3c5c 100644 --- a/crates/uv/src/commands/pip/install.rs +++ b/crates/uv/src/commands/pip/install.rs @@ -417,7 +417,7 @@ pub(crate) async fn pip_install( return Ok(ExitStatus::Failure); } Err(operations::Error::Resolve(uv_resolver::ResolveError::DownloadAndBuild(dist, err))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(operations::Error::Resolve(uv_resolver::ResolveError::Build(dist, err))) => { @@ -428,7 +428,7 @@ pub(crate) async fn pip_install( dist, err, ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(operations::Error::Requirements(uv_requirements::Error::Build(dist, err))) => { diff --git a/crates/uv/src/commands/pip/sync.rs b/crates/uv/src/commands/pip/sync.rs index 7dde9dadb405..10118692b876 100644 --- a/crates/uv/src/commands/pip/sync.rs +++ b/crates/uv/src/commands/pip/sync.rs @@ -361,7 +361,7 @@ pub(crate) async fn pip_sync( return Ok(ExitStatus::Failure); } Err(operations::Error::Resolve(uv_resolver::ResolveError::DownloadAndBuild(dist, err))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(operations::Error::Resolve(uv_resolver::ResolveError::Build(dist, err))) => { @@ -372,7 +372,7 @@ pub(crate) async fn pip_sync( dist, err, ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(operations::Error::Requirements(uv_requirements::Error::Build(dist, err))) => { diff --git a/crates/uv/src/commands/project/add.rs b/crates/uv/src/commands/project/add.rs index ebf0736ce217..05b57ff1509c 100644 --- a/crates/uv/src/commands/project/add.rs +++ b/crates/uv/src/commands/project/add.rs @@ -682,7 +682,7 @@ pub(crate) async fn add( ProjectError::Operation(pip::operations::Error::Resolve( uv_resolver::ResolveError::DownloadAndBuild(dist, err), )) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); Ok(ExitStatus::Failure) } ProjectError::Operation(pip::operations::Error::Resolve( @@ -694,7 +694,7 @@ pub(crate) async fn add( ProjectError::Operation(pip::operations::Error::Requirements( uv_requirements::Error::DownloadAndBuild(dist, err), )) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); Ok(ExitStatus::Failure) } ProjectError::Operation(pip::operations::Error::Requirements( diff --git a/crates/uv/src/commands/project/export.rs b/crates/uv/src/commands/project/export.rs index c2d13de2148f..36504040848b 100644 --- a/crates/uv/src/commands/project/export.rs +++ b/crates/uv/src/commands/project/export.rs @@ -151,7 +151,7 @@ pub(crate) async fn export( Err(ProjectError::Operation(pip::operations::Error::Resolve( uv_resolver::ResolveError::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(pip::operations::Error::Resolve( @@ -163,7 +163,7 @@ pub(crate) async fn export( Err(ProjectError::Operation(pip::operations::Error::Requirements( uv_requirements::Error::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(pip::operations::Error::Requirements( diff --git a/crates/uv/src/commands/project/lock.rs b/crates/uv/src/commands/project/lock.rs index d652ebc8d845..3f3866b87b58 100644 --- a/crates/uv/src/commands/project/lock.rs +++ b/crates/uv/src/commands/project/lock.rs @@ -172,7 +172,7 @@ pub(crate) async fn lock( Err(ProjectError::Operation(pip::operations::Error::Resolve( uv_resolver::ResolveError::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); Ok(ExitStatus::Failure) } Err(ProjectError::Operation(pip::operations::Error::Resolve( @@ -184,7 +184,7 @@ pub(crate) async fn lock( Err(ProjectError::Operation(pip::operations::Error::Requirements( uv_requirements::Error::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); Ok(ExitStatus::Failure) } Err(ProjectError::Operation(pip::operations::Error::Requirements( diff --git a/crates/uv/src/commands/project/run.rs b/crates/uv/src/commands/project/run.rs index c48f2d50e5bb..95ab47f077b1 100644 --- a/crates/uv/src/commands/project/run.rs +++ b/crates/uv/src/commands/project/run.rs @@ -308,7 +308,7 @@ pub(crate) async fn run( Err(ProjectError::Operation(operations::Error::Resolve( uv_resolver::ResolveError::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(operations::Error::Resolve( @@ -320,7 +320,7 @@ pub(crate) async fn run( Err(ProjectError::Operation(operations::Error::Requirements( uv_requirements::Error::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(operations::Error::Requirements( @@ -649,7 +649,7 @@ pub(crate) async fn run( Err(ProjectError::Operation(operations::Error::Resolve( uv_resolver::ResolveError::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(operations::Error::Resolve( @@ -661,7 +661,7 @@ pub(crate) async fn run( Err(ProjectError::Operation(operations::Error::Requirements( uv_requirements::Error::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(operations::Error::Requirements( @@ -864,7 +864,7 @@ pub(crate) async fn run( Err(ProjectError::Operation(operations::Error::Resolve( uv_resolver::ResolveError::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(operations::Error::Resolve( @@ -876,7 +876,7 @@ pub(crate) async fn run( Err(ProjectError::Operation(operations::Error::Requirements( uv_requirements::Error::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(operations::Error::Requirements( diff --git a/crates/uv/src/commands/project/sync.rs b/crates/uv/src/commands/project/sync.rs index 03243d8623f1..339763252054 100644 --- a/crates/uv/src/commands/project/sync.rs +++ b/crates/uv/src/commands/project/sync.rs @@ -163,7 +163,7 @@ pub(crate) async fn sync( Err(ProjectError::Operation(operations::Error::Resolve( uv_resolver::ResolveError::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(operations::Error::Resolve( @@ -175,7 +175,7 @@ pub(crate) async fn sync( Err(ProjectError::Operation(operations::Error::Requirements( uv_requirements::Error::DownloadAndBuild(dist, err), ))) => { - diagnostics::fetch_and_build(dist, err); + diagnostics::download_and_build(dist, err); return Ok(ExitStatus::Failure); } Err(ProjectError::Operation(operations::Error::Requirements(