Skip to content

Commit 55f6aeb

Browse files
committed
Auto merge of #13286 - Manishearth:prereleases, r=epage
More docs on prerelease compat We had some questions about semver compat of prereleases when discussing unicode-org/icu4x#4445, figured I'd document our findings.
2 parents f4e2eac + 200e9f6 commit 55f6aeb

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/doc/src/reference/resolver.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,20 @@ explicitly asked to install one.
162162

163163
Cargo allows "newer" pre-releases to be used automatically. For example, if
164164
`1.0.0-beta` is published, then a requirement `foo = "1.0.0-alpha"` will allow
165-
updating to the `beta` version. Beware that pre-release versions can be
166-
unstable, and as such care should be taken when using them. Some projects may
167-
choose to publish breaking changes between pre-release versions. It is
168-
recommended to not use pre-release dependencies in a library if your library
169-
is not also a pre-release. Care should also be taken when updating your
170-
`Cargo.lock`, and be prepared if a pre-release update causes issues.
165+
updating to the `beta` version. Note that this only works on the same release
166+
version, `foo = "1.0.0-alpha"` will not allow updating to `foo = "1.0.1-alpha"`
167+
or `foo = "1.0.1-beta"`.
168+
169+
Cargo will also upgrade automatically to semver-compatible released versions
170+
from prereleases. The requirement `foo = "1.0.0-alpha"` will allow updating to
171+
`foo = "1.0.0"` as well as `foo = "1.2.0"`.
172+
173+
Beware that pre-release versions can be unstable, and as such care should be
174+
taken when using them. Some projects may choose to publish breaking changes
175+
between pre-release versions. It is recommended to not use pre-release
176+
dependencies in a library if your library is not also a pre-release. Care
177+
should also be taken when updating your `Cargo.lock`, and be prepared if a
178+
pre-release update causes issues.
171179

172180
The pre-release tag may be separated with periods to distinguish separate
173181
components. Numeric components will use numeric comparison. For example,

0 commit comments

Comments
 (0)