Skip to content

Commit

Permalink
fix(resolve): Generalize term describing updates
Browse files Browse the repository at this point in the history
`latest` was easy.  `latest compatible` was ok.  But how do I talk about
"latest compatible with your MSRV".  That gets messy.
  • Loading branch information
epage committed Aug 30, 2024
1 parent e14f690 commit ded3f00
Show file tree
Hide file tree
Showing 36 changed files with 67 additions and 67 deletions.
4 changes: 2 additions & 2 deletions src/cargo/ops/cargo_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ fn report_latest(possibilities: &[IndexSummary], change: &PackageChange) -> Opti
{
let warn = style::WARN;
let version = summary.version();
let report = format!(" {warn}(latest compatible: v{version}){warn:#}");
let report = format!(" {warn}(available: v{version}){warn:#}");
return Some(report);
}

Expand All @@ -781,7 +781,7 @@ fn report_latest(possibilities: &[IndexSummary], change: &PackageChange) -> Opti
style::WARN
};
let version = summary.version();
let report = format!(" {warn}(latest: v{version}){warn:#}");
let report = format!(" {warn}(available: v{version}){warn:#}");
return Some(report);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_add/default_features/stderr.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_add/namever/stderr.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/preserve_sorted/stderr.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/preserve_unsorted/stderr.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_add/rustc_latest/stderr.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_add/rustc_older/stderr.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testsuite/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fn ignore_version_from_other_platform() {
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 2 packages to latest compatible versions
[ADDING] bar v0.1.0 (latest: v0.2.0)
[ADDING] bar v0.1.0 (available: v0.2.0)
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.1.0 (registry `dummy-registry`)
[CHECKING] bar v0.1.0
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/collisions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ fn collision_doc_multiple_versions() {
str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 3 packages to latest compatible versions
[ADDING] bar v1.0.0 (latest: v2.0.0)
[ADDING] bar v1.0.0 (available: v2.0.0)
[DOWNLOADING] crates ...
[DOWNLOADED] bar v2.0.0 (registry `dummy-registry`)
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
Expand Down Expand Up @@ -503,7 +503,7 @@ fn collision_doc_target() {
str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 3 packages to latest compatible versions
[ADDING] bar v1.0.0 (latest: v2.0.0)
[ADDING] bar v1.0.0 (available: v2.0.0)
[DOWNLOADING] crates ...
[DOWNLOADED] orphaned v1.0.0 (registry `dummy-registry`)
[DOWNLOADED] bar v2.0.0 (registry `dummy-registry`)
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/direct_minimal_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn simple() {
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 1 package
[ADDING] dep v1.0.0 (latest compatible: v1.1.0)
[ADDING] dep v1.0.0 (available: v1.1.0)
"#]])
.run();
Expand Down Expand Up @@ -122,7 +122,7 @@ fn yanked() {
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 1 package
[ADDING] dep v1.1.0 (latest compatible: v1.2.0)
[ADDING] dep v1.1.0 (available: v1.2.0)
"#]])
.run();
Expand Down Expand Up @@ -176,7 +176,7 @@ fn indirect() {
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 2 packages
[ADDING] direct v1.0.0 (latest compatible: v1.1.0)
[ADDING] direct v1.0.0 (available: v1.1.0)
"#]])
.run();
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ fn multiple() {
p.cargo("check")
.with_stderr_data(str![[r#"
[LOCKING] 1 package to latest compatible version
[ADDING] bar v0.1.0 (latest: v0.2.0)
[ADDING] bar v0.1.0 (available: v0.2.0)
[CHECKING] bar v0.1.0
[CHECKING] foo v0.1.0 ([ROOT]/foo)
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2514,7 +2514,7 @@ fn self_referential() {
[DOWNLOADED] foo v0.0.2 (registry `dummy-registry`)
[INSTALLING] foo v0.0.2
[LOCKING] 1 package to latest compatible version
[ADDING] foo v0.0.1 (latest: v0.0.2)
[ADDING] foo v0.0.1 (available: v0.0.2)
[DOWNLOADING] crates ...
[DOWNLOADED] foo v0.0.1 (registry `dummy-registry`)
[COMPILING] foo v0.0.1
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/minimal_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn minimal_version_cli() {
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 1 package to earliest compatible version
[ADDING] dep v1.0.0 (latest compatible: v1.1.0)
[ADDING] dep v1.0.0 (available: v1.1.0)
"#]])
.run();
Expand Down
8 changes: 4 additions & 4 deletions tests/testsuite/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
[LOCKING] 1 package to latest compatible version
[ADDING] bar v0.1.0 (latest: v0.2.0)
[ADDING] bar v0.1.0 (available: v0.2.0)
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.1.0 (registry `dummy-registry`)
[CHECKING] bar v0.1.0
Expand Down Expand Up @@ -469,7 +469,7 @@ with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
[LOCKING] 1 package to latest compatible version
[ADDING] bar v0.1.0 (latest: v0.3.0)
[ADDING] bar v0.1.0 (available: v0.3.0)
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.1.0 (registry `dummy-registry`)
[CHECKING] bar v0.1.0
Expand Down Expand Up @@ -568,7 +568,7 @@ with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
[LOCKING] 1 package to latest compatible version
[ADDING] bar v0.1.0 (latest: v0.2.0)
[ADDING] bar v0.1.0 (available: v0.2.0)
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.1.0 (registry `dummy-registry`)
[CHECKING] bar v0.1.0
Expand Down Expand Up @@ -642,7 +642,7 @@ with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
[LOCKING] 1 package to latest compatible version
[ADDING] bar v0.1.0 (latest: v0.2.0)
[ADDING] bar v0.1.0 (available: v0.2.0)
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.1.0 (registry `dummy-registry`)
[CHECKING] bar v0.1.0
Expand Down
Loading

0 comments on commit ded3f00

Please sign in to comment.