mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-30 11:37:24 +00:00
Rework puffin sync output to summarize (#81)
This also moves away from using `tracing` for user-facing logging, instead introducing a new `Printer` abstraction. Closes #66.
This commit is contained in:
parent
2d4a8c361b
commit
a0294a510c
28 changed files with 900 additions and 485 deletions
21
crates/puffin-resolver/src/error.rs
Normal file
21
crates/puffin-resolver/src/error.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use thiserror::Error;
|
||||
|
||||
use pep508_rs::Requirement;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum ResolveError {
|
||||
#[error("Failed to find a version of {0} that satisfies the requirement")]
|
||||
NotFound(Requirement),
|
||||
|
||||
#[error(transparent)]
|
||||
Client(#[from] puffin_client::PypiClientError),
|
||||
|
||||
#[error(transparent)]
|
||||
TrySend(#[from] futures::channel::mpsc::SendError),
|
||||
}
|
||||
|
||||
impl<T> From<futures::channel::mpsc::TrySendError<T>> for ResolveError {
|
||||
fn from(value: futures::channel::mpsc::TrySendError<T>) -> Self {
|
||||
value.into_send_error().into()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue