mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-19 19:44:40 +00:00
Allow reporters to take dyn Metadata (#645)
This commit is contained in:
parent
1a62ca0c62
commit
eef9612719
5 changed files with 24 additions and 18 deletions
|
|
@ -8,7 +8,7 @@ use anyhow::Result;
|
|||
use futures::StreamExt;
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use distribution_types::Dist;
|
||||
use distribution_types::{Dist, Metadata};
|
||||
use pep440_rs::Version;
|
||||
use pep508_rs::{Requirement, VersionOrUrl};
|
||||
use platform_tags::{TagPriority, Tags};
|
||||
|
|
@ -239,7 +239,7 @@ enum Response {
|
|||
|
||||
pub trait Reporter: Send + Sync {
|
||||
/// Callback to invoke when a package is resolved to a specific distribution.
|
||||
fn on_progress(&self, wheel: &Dist);
|
||||
fn on_progress(&self, dist: &dyn Metadata);
|
||||
|
||||
/// Callback to invoke when the resolution is complete.
|
||||
fn on_complete(&self);
|
||||
|
|
|
|||
|
|
@ -752,10 +752,10 @@ pub trait Reporter: Send + Sync {
|
|||
fn on_complete(&self);
|
||||
|
||||
/// Callback to invoke when a source distribution build is kicked off.
|
||||
fn on_build_start(&self, dist: &SourceDist) -> usize;
|
||||
fn on_build_start(&self, dist: &dyn Metadata) -> usize;
|
||||
|
||||
/// Callback to invoke when a source distribution build is complete.
|
||||
fn on_build_complete(&self, dist: &SourceDist, id: usize);
|
||||
fn on_build_complete(&self, dist: &dyn Metadata, id: usize);
|
||||
|
||||
/// Callback to invoke when a repository checkout begins.
|
||||
fn on_checkout_start(&self, url: &Url, rev: &str) -> usize;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue