fix: expose types to implement custom ResolverProvider (#1862)

<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

To integrate `uv` into `pixi` I need to specify a custom
`ResolverProvider` to be able to specify that some packages are already
installed by conda and should not be touched. However, some of the types
required to implement your own `ResolverProvider` were not accessible
through the public API. This PR basically adds them.

## Test Plan

I didnt add an explicit test for this.
This commit is contained in:
Bas Zalmstra 2024-02-22 15:59:03 +01:00 committed by GitHub
parent e97b094bc9
commit 4e011b305f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 7 deletions

View file

@ -181,6 +181,14 @@ impl From<FlatDistributions> for VersionMap {
}
}
impl From<BTreeMap<Version, PrioritizedDist>> for VersionMap {
fn from(value: BTreeMap<Version, PrioritizedDist>) -> Self {
Self {
inner: VersionMapInner::Eager(value),
}
}
}
/// A lazily initialized distribution.
///
/// This permits access to a handle that can be turned into a resolvable