|
2 | 2 |
|
3 | 3 | All notable changes to this project will be documented in this file.
|
4 | 4 |
|
5 |
| -## Unreleased [(diff)][unreleased-diff] |
| 5 | +## [0.3.0] UNRELEASED [(diff with 0.2.1)][unreleased-diff] |
| 6 | + |
| 7 | +PubGrub 0.3 improves the interfaces and speeds resolution significantly. |
| 8 | + |
| 9 | +All public interfaces are now in the root of the crate. |
| 10 | + |
| 11 | +In the main interface, [`DependencyProvider`](TODO), `choose_package_version` was split into two methods: `prioritize` |
| 12 | +for choosing which package to decide next by assigning a priority to each package, and `choose_version`. The generic |
| 13 | +parameters became associated types. The version set is configurable by an associated type. |
| 14 | + |
| 15 | +[`Dependencies`](TODO) gained a generic parameter for custom incompatibility type outside version conflicts, such as |
| 16 | +packages not available for the current platform or permission errors. This type is on `DependencyProvider` as |
| 17 | +`DependencyProvider::M`. |
| 18 | + |
| 19 | +`pubgrub::range::Range` now lives in its own crate as [`version_ranges::Ranges`](https://docs.rs/version-ranges/0.1/version_ranges/struct.Ranges.html). |
| 20 | + |
| 21 | +At a glance, this is the new `DependencyProvider` interface: |
| 22 | + |
| 23 | +```rust |
| 24 | +pub trait DependencyProvider { |
| 25 | + type P: Package; |
| 26 | + type V: Debug + Display + Clone + Ord; |
| 27 | + type VS: VersionSet<V = Self::V>; |
| 28 | + type M: Eq + Clone + Debug + Display; |
| 29 | + type Priority: Ord + Clone; |
| 30 | + type Err: Error + 'static; |
| 31 | + |
| 32 | + fn prioritize( |
| 33 | + &self, |
| 34 | + package: &Self::P, |
| 35 | + range: &Self::VS, |
| 36 | + package_conflicts_counts: &PackageResolutionStatistics, |
| 37 | + ) -> Self::Priority; |
| 38 | + |
| 39 | + fn choose_version( |
| 40 | + &self, |
| 41 | + package: &Self::P, |
| 42 | + range: &Self::VS, |
| 43 | + ) -> Result<Option<Self::V>, Self::Err>; |
| 44 | + |
| 45 | + fn get_dependencies( |
| 46 | + &self, |
| 47 | + package: &Self::P, |
| 48 | + version: &Self::V, |
| 49 | + ) -> Result<Dependencies<Self::P, Self::VS, Self::M>, Self::Err>; |
| 50 | + |
| 51 | +} |
| 52 | +``` |
6 | 53 |
|
7 | 54 | ## [0.2.1] - 2021-06-30 - [(diff with 0.2.0)][0.2.0-diff]
|
8 | 55 |
|
|
0 commit comments