You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/3493-precise-pre-release-cargo-update.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ would become
104
104
```
105
105
1.2.3 -> ^1.2.3 -> >=1.2.3, <2.0.0-0
106
106
```
107
-
Note that the old syntax implicitly excluded `2.0.0-<prelease>` which we have have to explicitly exclude by referencing the smallest possible pre-release version of `-0`.
107
+
Note that the old syntax implicitly excluded `2.0.0-<prerelease>` which we have have to explicitly exclude by referencing the smallest possible pre-release version of `-0`.
108
108
109
109
This change applies to all operators.
110
110
@@ -141,7 +141,7 @@ However, we leave the exact API details to the maintainer of the `semver` packag
141
141
- Pre-release versions are not easily auditable when they are only specified in the lock file.
142
142
A change that makes use of a pre-release version may not be noticed during code review as reviewers don't always check for changes in the lock file.
143
143
- Library crates that require a pre-release version are not well supported since their lock files are ignored by their users (see [future-possibilities])
144
-
- This is an invasive change to cargo with a significant risk for bugs. This also extends out to packages in the ecosystem that deal with depednency versions.
144
+
- This is an invasive change to cargo with a significant risk for bugs. This also extends out to packages in the ecosystem that deal with dependency versions.
145
145
- There is a risk that error messages from the resolver may be negatively affected and we might be limited in fixes due to the resolver's current design.
146
146
147
147
# Rationale and alternatives
@@ -154,7 +154,7 @@ having `foo@1.2.3-alpha.0` in your `Cargo.lock` does not implicitly mean you can
154
154
To update within pre-releases, you'll have to use `--precise` again.
155
155
156
156
Instead, the lockfile could identify that `foo@1.2.3-alpha.0` is a pre-release allow updating to any `1.2.3` pre-release.
157
-
`cargo update` focuses on compatible updates and pre-releases aren't necesarrily compatible with each other
157
+
`cargo update` focuses on compatible updates and pre-releases aren't necessarily compatible with each other
158
158
(see also [RFC: Precise Pre-release Deps](https://github.com/rust-lang/rfcs/pull/3263)).
159
159
Alternatively, in [future-possibilities] is `cargo update -p foo --allow-prerelease` which would be an explicit way to update.
160
160
@@ -222,7 +222,7 @@ through by modifying `Cargo.toml`.
222
222
^1.2.3 -> >=1.2.3, <2.0.0-0
223
223
```
224
224
225
-
The addition of an implicit `-0` excludes `2.0.0-<prelease>` releases.
225
+
The addition of an implicit `-0` excludes `2.0.0-<prerelease>` releases.
226
226
This transformation will also be made when the user explicitly specifies a multiple-version requirement range.
227
227
228
228
```
@@ -258,8 +258,8 @@ Since crates ignore the lock files of their dependencies there is no way for `a`
258
258
To enable this we could use the same concept of compatible pre-releases in `Cargo.toml`, not just `Cargo.lock`.
259
259
This would require that pre-releases are specified with `=` and would allow pre-release versions to be requested anywhere within the dependency tree without causing the resolver to throw an error.
260
260
261
-
## `--allow-prelease`
261
+
## `--allow-prerelease`
262
262
263
-
Instead of manually selecting a version with `--precise`, we could support `cargo update --package foo --allow-prelease`.
263
+
Instead of manually selecting a version with `--precise`, we could support `cargo update --package foo --allow-prerelease`.
264
264
265
265
If we made this flag work without `--package`, we could the extend it also to `cargo generate-lockfile`.
0 commit comments