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:
Charlie Marsh 2023-10-09 23:29:09 -04:00 committed by GitHub
parent 2d4a8c361b
commit a0294a510c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 900 additions and 485 deletions

View 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()
}
}