mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Upgrade pubgrub-rs
version (#220)
Upgrades our PubGrub to 8951e37fe923a7edd5a78ed5f49f165b0fdc48de.
This commit is contained in:
parent
1e4259a608
commit
4209e77c95
9 changed files with 61 additions and 128 deletions
|
@ -195,27 +195,14 @@ impl<'a, Context: BuildContext + Sync> Resolver<'a, Context> {
|
|||
));
|
||||
continue;
|
||||
}
|
||||
Dependencies::Known(constraints) => {
|
||||
if constraints.contains_key(package) {
|
||||
return Err(PubGrubError::SelfDependency {
|
||||
package: package.clone(),
|
||||
version: version.clone(),
|
||||
}
|
||||
.into());
|
||||
Dependencies::Known(constraints) if constraints.contains_key(package) => {
|
||||
return Err(PubGrubError::SelfDependency {
|
||||
package: package.clone(),
|
||||
version: version.clone(),
|
||||
}
|
||||
if let Some((dependent, _)) = constraints
|
||||
.iter()
|
||||
.find(|(_, r)| r == &&Range::<PubGrubVersion>::empty())
|
||||
{
|
||||
return Err(PubGrubError::DependencyOnTheEmptySet {
|
||||
package: package.clone(),
|
||||
version: version.clone(),
|
||||
dependent: dependent.clone(),
|
||||
}
|
||||
.into());
|
||||
}
|
||||
constraints
|
||||
.into());
|
||||
}
|
||||
Dependencies::Known(constraints) => constraints,
|
||||
};
|
||||
|
||||
// Add that package and version if the dependencies are not problematic.
|
||||
|
@ -225,17 +212,6 @@ impl<'a, Context: BuildContext + Sync> Resolver<'a, Context> {
|
|||
&dependencies,
|
||||
);
|
||||
|
||||
if state.incompatibility_store[dep_incompats.clone()]
|
||||
.iter()
|
||||
.any(|incompat| state.is_terminal(incompat))
|
||||
{
|
||||
// For a dependency incompatibility to be terminal,
|
||||
// it can only mean that root depend on not root?
|
||||
return Err(PubGrubError::Failure(
|
||||
"Root package depends on itself at a different version?".into(),
|
||||
)
|
||||
.into());
|
||||
}
|
||||
state.partial_solution.add_version(
|
||||
package.clone(),
|
||||
version,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue