@@ -51,15 +51,15 @@ version but not both.
5151
5252Another issue would be that the proxy and bucket scheme breaks strategies
5353depending on ordering of versions. Since we have two proxy versions, one
54- targetting the normal bucket, and one targetting the pre-release bucket, a
54+ targeting the normal bucket, and one targeting the pre-release bucket, a
5555strategy aiming at the newest versions will lean towards normal or pre-release
5656depending if the newest proxy version is the one for the normal or pre-release
5757bucket. Mitigating this issue seems complicated, but hopefully, we are also
5858exploring alternative API changes that could enable pre-releases.
5959
6060## Multi-dimensional ranges
6161
62- Building on top of the ` Ranges ` API, we could implement a custom ` VersionSet ` of
62+ Building on top of the ` Ranges ` API, we can implement a custom ` VersionSet ` of
6363multi-dimensional ranges:
6464
6565``` rust
@@ -69,10 +69,9 @@ pub struct DoubleRange<V1: Version, V2: Version> {
6969}
7070```
7171
72- With multi-dimensional ranges we could match the semantics of version
73- constraints in ways that do not introduce alterations of the core of the
74- algorithm. For example, the constraint ` 2.0.0-alpha <= v < 2.0.0 ` could be
75- matched to:
72+ With multi-dimensional ranges we can match the semantics of version constraints
73+ in ways that do not introduce alterations of the core of the algorithm. For
74+ example, the constraint ` 2.0.0-alpha <= v < 2.0.0 ` can be matched to:
7675
7776``` rust
7877DoubleRange {
@@ -81,18 +80,13 @@ DoubleRange {
8180}
8281```
8382
84- And the constraint ` 2.0.0-alpha <= v < 2.1.0 ` would have the same
85- ` prerelease_range ` but would have ` 2.0.0 <= v < 2.1.0 ` for the normal range.
86- Those constraints could also be interpreted differently since not all
87- pre-release systems work the same. But the important property is that this
88- enables a separation of the dimensions that do not behave consistently with
89- regard to the mathematical properties of the sets manipulated.
83+ And the constraint ` 2.0.0-alpha <= v < 2.1.0 ` has the same ` prerelease_range `
84+ but has ` 2.0.0 <= v < 2.1.0 ` for the normal range. Those constraints could also
85+ be interpreted differently since not all pre-release systems work the same. But
86+ the important property is that this enables a separation of the dimensions that
87+ do not behave consistently with regard to the mathematical properties of the
88+ sets manipulated.
9089
91- All this needs more experimentation, to try reaching a sweet spot API-wise and
92- performance-wise. If you are eager to experiment with all the extensions and
93- limitations mentioned in this section of the guide for your dependency provider,
94- don't hesitate to reach out to us in our [ zulip stream] [ zulip ] or in [ GitHub
95- issues] [ issues ] to let us know how it went!
96-
97- [ zulip ] : https://rust-lang.zulipchat.com/#narrow/stream/260232-t-cargo.2FPubGrub
98- [ issues ] : https://github.com/pubgrub-rs/pubgrub/issues
90+ This strategy is successfully used by
91+ [ semver-pubgrub] ( https://github.com/pubgrub-rs/semver-pubgrub ) to model rust
92+ dependencies.
0 commit comments