mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-30 11:37:24 +00:00
Update pubgrub to use a dependency provider (#2648)
With https://github.com/pubgrub-rs/pubgrub/pull/190, pubgrub attaches all types to a dependency provider to reduce the number of generics. We need a dummy dependency provider now to emulate this. On the plus side, pep440_rs drops its pubgrub dependency.
This commit is contained in:
parent
8cc69a723d
commit
33bde826a0
9 changed files with 51 additions and 34 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use std::collections::BTreeSet;
|
||||
use std::convert::Infallible;
|
||||
use std::fmt::Formatter;
|
||||
use std::ops::Deref;
|
||||
|
||||
|
|
@ -16,6 +15,7 @@ use pep508_rs::Requirement;
|
|||
use uv_normalize::PackageName;
|
||||
|
||||
use crate::candidate_selector::CandidateSelector;
|
||||
use crate::dependency_provider::UvDependencyProvider;
|
||||
use crate::pubgrub::{PubGrubPackage, PubGrubPython, PubGrubReportFormatter};
|
||||
use crate::python_requirement::PythonRequirement;
|
||||
use crate::resolver::{UnavailablePackage, VersionsResponse};
|
||||
|
|
@ -100,12 +100,8 @@ impl<T> From<tokio::sync::mpsc::error::SendError<T>> for ResolveError {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<pubgrub::error::PubGrubError<PubGrubPackage, Range<Version>, Infallible>>
|
||||
for ResolveError
|
||||
{
|
||||
fn from(
|
||||
value: pubgrub::error::PubGrubError<PubGrubPackage, Range<Version>, Infallible>,
|
||||
) -> Self {
|
||||
impl From<pubgrub::error::PubGrubError<UvDependencyProvider>> for ResolveError {
|
||||
fn from(value: pubgrub::error::PubGrubError<UvDependencyProvider>) -> Self {
|
||||
match value {
|
||||
// These are all never type variant that can never match, but never is experimental
|
||||
pubgrub::error::PubGrubError::ErrorChoosingPackageVersion(_)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue