|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +## Unreleased [(diff)][diff-unreleased] |
| 6 | + |
| 7 | +## [0.2.0] - 2020-11-19 - [(diff with 0.1.0)][diff-0.2.0] |
| 8 | + |
| 9 | +This release brings many important improvements to PubGrub. |
| 10 | +The gist of it is: |
| 11 | + |
| 12 | +- A bug in the algorithm's implementation was [fixed](https://github.com/pubgrub-rs/pubgrub/pull/23). |
| 13 | +- The solver is now implemented in a `resolve` function taking as argument |
| 14 | + an implementer of the `DependencyProvider` trait, |
| 15 | + which has more control over the decision making process. |
| 16 | +- End-to-end property testing of large synthetic registries was added. |
| 17 | +- More than 10x performance improvement. |
| 18 | + |
| 19 | +### Changes affecting the public API |
| 20 | + |
| 21 | +#### Added |
| 22 | + |
| 23 | +- Links to code items in the code documenation. |
| 24 | +- New `"serde"` feature that allows serializing some library types, useful for making simple reproducible bug reports. |
| 25 | +- New variants for `error::PubGrubError` which are `DependencyOnTheEmptySet`, |
| 26 | + `SelfDependency`, `ErrorChoosingPackageVersion` and `ErrorInShouldCancel`. |
| 27 | +- New `type_alias::Map` defined as `rustc_hash::FxHashMap`. |
| 28 | +- New `type_alias::SelectedDependencies<P, V>` defined as `Map<P, V>`. |
| 29 | +- The types `Dependencies` and `DependencyConstraints` were introduced to clarify intent. |
| 30 | +- New function `choose_package_with_fewest_versions` to help implement |
| 31 | + the `choose_package_version` method of a `DependencyProvider`. |
| 32 | +- Implement `FromStr` for `SemanticVersion`. |
| 33 | +- Add the `VersionParseError` type for parsing of semantic versions. |
| 34 | + |
| 35 | +#### Changed |
| 36 | + |
| 37 | +- The `Solver` trait was replaced by a `DependencyProvider` trait |
| 38 | + which now must implement a `choose_package_version` method |
| 39 | + instead of `list_available_versions`. |
| 40 | + So it now has the ability to choose a package in addition to a version. |
| 41 | + The `DependencyProvider` also has a new optional method `should_cancel` |
| 42 | + that may be used to stop the solver if needed. |
| 43 | +- The `choose_package_version` and `get_dependencies` methods of the |
| 44 | + `DependencyProvider` trait now take an immutable reference to `self`. |
| 45 | + Interior mutability can be used by implementor if mutability is needed. |
| 46 | +- The `Solver.run` method was thus replaced by a free function `solver::resolve` |
| 47 | + taking a dependency provider as first argument. |
| 48 | +- The `OfflineSolver` is thus replaced by an `OfflineDependencyProvider`. |
| 49 | +- `SemanticVersion` now takes `u32` instead of `usize` for its 3 parts. |
| 50 | +- `NumberVersion` now uses `u32` instead of `usize`. |
| 51 | + |
| 52 | +#### Removed |
| 53 | + |
| 54 | +- `ErrorRetrievingVersions` variant of `error::PubGrubError`. |
| 55 | + |
| 56 | +### Changes in the internal parts of the API |
| 57 | + |
| 58 | +#### Added |
| 59 | + |
| 60 | +- `benches/large_case.rs` enables benchmarking of serialized registries of packages. |
| 61 | +- `examples/caching_dependency_provider.rs` an example dependency provider caching dependencies. |
| 62 | +- `PackageTerm<P, V> = (P, Term<V>)` new type alias for readability. |
| 63 | +- `Memory.term_intersection_for_package(&mut self, package: &P) -> Option<&Term<V>>` |
| 64 | +- New types were introduces for conflict resolution in `internal::partial_solution` |
| 65 | + to clarify the intent and return values of some functions. |
| 66 | + Those types are `DatedAssignment` and `SatisfierAndPreviousHistory`. |
| 67 | +- `PartialSolution.term_intersection_for_package` calling the same function |
| 68 | + from its `memory`. |
| 69 | +- New property tests for ranges: `negate_contains_opposite`, `intesection_contains_both` |
| 70 | + and `union_contains_either`. |
| 71 | +- A large synthetic test case was added in `test-examples/`. |
| 72 | +- A new test example `double_choices` was added |
| 73 | + for the detection of a bug (fixed) in the implementation. |
| 74 | +- Property testing of big synthetic datasets was added in `tests/proptest.rs`. |
| 75 | +- Comparison of PubGrub solver and a SAT solver |
| 76 | + was added with `tests/sat_dependency_provider.rs`. |
| 77 | +- Other regression and unit tests were added to `tests/tests.rs`. |
| 78 | + |
| 79 | +#### Changed |
| 80 | + |
| 81 | +- CI workflow was improved (`./github/workflows/`), including a check for [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and [Clippy ](https://github.com/rust-lang/rust-clippy) for source code linting. |
| 82 | +- Using SPDX license identifiers instead of MPL-2.0 classic file headers. |
| 83 | +- `State.incompatibilities` is now wrapped inside a `Rc`. |
| 84 | +- `DecisionLevel(u32)` is used in place of `usize` for partial solution decision levels. |
| 85 | +- `State.conflict_resolution` now also returns the almost satisfied package |
| 86 | + to avoid an unnecessary call to `self.partial_solution.relation(...)` after conflict resolution. |
| 87 | +- `Kind::NoVersion` renamed to `Kind::NoVersions` and all other usage of `noversion` |
| 88 | + has been changed to `no_versions`. |
| 89 | +- Variants of the `incompatibility::Relation` enum have changed. |
| 90 | +- Incompatibility now uses a deterministic hasher to store packages in its hash map. |
| 91 | +- `incompatibility.relation(...)` now takes a function as argument to avoid computations |
| 92 | + of unnecessary terms intersections. |
| 93 | +- `Memory` now uses a deterministic hasher instead of the default one. |
| 94 | +- `memory::PackageAssignments` is now an enum instead of a struct. |
| 95 | +- Derivations in a `PackageAssignments` keep a precomputed intersection of derivation terms. |
| 96 | +- `potential_packages` method now returns a `Range` |
| 97 | + instead of a `Term` for the versions constraint of each package. |
| 98 | +- `PartialSolution.relation` now takes `&mut self` instead of `&self` |
| 99 | + to be able to store computation of terms intersection. |
| 100 | +- `Term.accept_version` was renamed `Term.contains`. |
| 101 | +- The `satisfied_by` and `contradicted_by` methods of a `Term` |
| 102 | + now directly takes a reference to the intersection of other terms. |
| 103 | + Same for `relation_with`. |
| 104 | + |
| 105 | +#### Removed |
| 106 | + |
| 107 | +- `term` field of an `Assignment::Derivation` variant. |
| 108 | +- `Memory.all_terms` method was removed. |
| 109 | +- `Memory.remove_decision` method was removed in favor of a check before using `Memory.add_decision`. |
| 110 | +- `PartialSolution` methods `pick_package` and `pick_version` have been removed |
| 111 | + since control was given back to the dependency provider to choose a package version. |
| 112 | +- `PartialSolution` methods `remove_last_decision` and `satisfies_any_of` were removed |
| 113 | + in favor of a preventive check before calling `add_decision`. |
| 114 | +- `Term.is_negative`. |
| 115 | + |
| 116 | +#### Fixed |
| 117 | + |
| 118 | +- Prior cause computation (`incompatibility::prior_cause`) now uses the intersection of package terms |
| 119 | + instead of their union, which was an implementation error. |
| 120 | + |
| 121 | +## [0.1.0] - 2020-10-01 |
| 122 | + |
| 123 | +### Added |
| 124 | + |
| 125 | +- `README.md` as the home page of this repository. |
| 126 | +- `LICENSE`, code is provided under the MPL 2.0 license. |
| 127 | +- `Cargo.toml` configuration of this Rust project. |
| 128 | +- `src/` containing all the source code for this first implementation of PubGrub in Rust. |
| 129 | +- `tests/` containing test end-to-end examples. |
| 130 | +- `examples/` other examples, not in the form of tests. |
| 131 | +- `.gitignore` configured for a Rust project. |
| 132 | +- `.github/workflows/` CI to automatically build, test and document on push and pull requests. |
| 133 | + |
| 134 | +[0.2.0]: https://github.com/pubgrub-rs/pubgrub/releases/tag/v0.2.0 |
| 135 | +[0.1.0]: https://github.com/pubgrub-rs/pubgrub/releases/tag/v0.1.0 |
| 136 | +[diff-unreleased]: https://github.com/pubgrub-rs/pubgrub/compare/release...dev |
| 137 | +[diff-0.2.0]: https://github.com/mpizenberg/elm-pointer-events/compare/v0.1.0...v0.2.0 |
0 commit comments