Skip to content

Commit c48e1bb

Browse files
committed
Provide more context in the motivation
1 parent 0f8bf41 commit c48e1bb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

text/3493-precise-pre-release-cargo-update.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ the resolver ignoring pre-releases like yanked packages, with an override flag.
1818
# Motivation
1919
[motivation]: #motivation
2020

21-
Pre-release crates are currently challenging to use in large projects with complex dependency trees.
21+
Today, version requirements ignore pre-release versions,
22+
so `1.0.0` cannot be used with `1.1.0-alpha.1`.
23+
Specifying a pre-release in a version requirement has two affects
24+
- Specifies the minimum compatible pre-release.
25+
- Opts-in to matching version requirements (within a version)
26+
27+
However, coupling these concerns makes it difficult to try out pre-releases
28+
because every dependency in the tree has to opt-in.
2229
For example, if a maintainer releases `dep = "0.1.1-pre.0"`.
2330
They may ask one of their users to try the new API additions in a large project so that the user can give feedback on the release before the maintainer stabilises the new parts of the API.
2431
Unfortunately, since `dep = "0.1.0"` is a transitive dependency of several dependencies of the large project, `cargo` refuses the upgrade, stating that `0.1.1-pre.0` is incompatible with `0.1.0`.

0 commit comments

Comments
 (0)