Skip to content

Commit 97ca90e

Browse files
authored
(Pre)Release 0.3.0-alpha.1 (#309)
* Bump version * Start changelog
1 parent abc84d4 commit 97ca90e

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

CHANGELOG.md

+48-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,54 @@
22

33
All notable changes to this project will be documented in this file.
44

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+
```
653

754
## [0.2.1] - 2021-06-30 - [(diff with 0.2.0)][0.2.0-diff]
855

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ members = ["version-ranges"]
55

66
[package]
77
name = "pubgrub"
8-
version = "0.2.1"
8+
version = "0.3.0-alpha.1"
99
authors = [
1010
"Matthieu Pizenberg <[email protected]>",
1111
"Alex Tokarev <[email protected]>",

0 commit comments

Comments
 (0)