fix(future): Lead with the suggested action

This commit is contained in:
Ed Page 2025-09-09 16:34:32 -05:00
parent 95aa52c177
commit 155255fe41
2 changed files with 31 additions and 55 deletions

View File

@ -434,8 +434,7 @@ pub fn save_and_display_report(
let update_message = if !updated_versions.is_empty() {
format!(
"\
Some affected dependencies have newer versions available.
You may want to consider updating them to a newer version to see if the issue has been fixed.
Update to a newer version to see if the issue has been fixed:
{updated_versions}",
updated_versions = updated_versions
)
@ -475,18 +474,15 @@ You may want to consider updating them to a newer version to see if the issue ha
}
suggestions.push(format!(
"\
If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
Ensure the maintainers know of this problem (e.g. creating a bug report if needed)
or even helping with a fix (e.g. by creating a pull request):
{upstream_info}"
));
suggestions.push(
"\
If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
Use your own version of the dependency with the `[patch]` section in `Cargo.toml`.
For more information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section"
.to_owned(),
);

View File

@ -148,18 +148,15 @@ fn incompat_in_dependency() {
[WARNING] the following packages contain code that will be rejected by a future version of Rust: bar v1.0.0
[NOTE] To solve this problem, you can try the following approaches:
- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
- Ensure the maintainers know of this problem (e.g. creating a bug report if needed)
or even helping with a fix (e.g. by creating a pull request):
- bar@1.0.0
- Repository: https://example.com/
- Detailed warning command: `cargo report future-incompatibilities --id 1 --package bar@1.0.0`
- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
- Use your own version of the dependency with the `[patch]` section in `Cargo.toml`.
For more information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
[NOTE] this report can be shown with `cargo report future-incompatibilities --id 1`
@ -181,18 +178,15 @@ means and how to resolve it.
To solve this problem, you can try the following approaches:
- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
- Ensure the maintainers know of this problem (e.g. creating a bug report if needed)
or even helping with a fix (e.g. by creating a pull request):
- bar@1.0.0
- Repository: https://example.com/
- Detailed warning command: `cargo report future-incompatibilities --id 1 --package bar@1.0.0`
- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
- Use your own version of the dependency with the `[patch]` section in `Cargo.toml`.
For more information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
The package `bar v1.0.0` currently triggers the following future incompatibility lints:
@ -603,16 +597,13 @@ fn suggestions_for_updates() {
[WARNING] the following packages contain code that will be rejected by a future version of Rust: big_update v1.0.0, with_updates v1.0.0, without_updates v1.0.0
[NOTE] To solve this problem, you can try the following approaches:
- Some affected dependencies have newer versions available.
You may want to consider updating them to a newer version to see if the issue has been fixed.
- Update to a newer version to see if the issue has been fixed:
- big_update v1.0.0 has the following newer versions available: 2.0.0
- with_updates v1.0.0 has the following newer versions available: 1.0.1, 1.0.2, 3.0.1
- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
- Ensure the maintainers know of this problem (e.g. creating a bug report if needed)
or even helping with a fix (e.g. by creating a pull request):
- big_update@1.0.0
- Repository: <not found>
@ -626,9 +617,8 @@ fix to the maintainers (e.g. by creating a pull request):
- Repository: <not found>
- Detailed warning command: `cargo report future-incompatibilities --id 1 --package without_updates@1.0.0`
- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
- Use your own version of the dependency with the `[patch]` section in `Cargo.toml`.
For more information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
[NOTE] this report can be shown with `cargo report future-incompatibilities --id 1`
@ -650,16 +640,13 @@ means and how to resolve it.
To solve this problem, you can try the following approaches:
- Some affected dependencies have newer versions available.
You may want to consider updating them to a newer version to see if the issue has been fixed.
- Update to a newer version to see if the issue has been fixed:
- big_update v1.0.0 has the following newer versions available: 2.0.0
- with_updates v1.0.0 has the following newer versions available: 1.0.1, 1.0.2, 3.0.1
- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
- Ensure the maintainers know of this problem (e.g. creating a bug report if needed)
or even helping with a fix (e.g. by creating a pull request):
- big_update@1.0.0
- Repository: <not found>
@ -673,9 +660,8 @@ fix to the maintainers (e.g. by creating a pull request):
- Repository: <not found>
- Detailed warning command: `cargo report future-incompatibilities --id 1 --package without_updates@1.0.0`
- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
- Use your own version of the dependency with the `[patch]` section in `Cargo.toml`.
For more information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
The package `big_update v1.0.0` currently triggers the following future incompatibility lints:
@ -716,18 +702,15 @@ fn correct_report_id_when_cached() {
[WARNING] the following packages contain code that will be rejected by a future version of Rust: bar v1.0.0
[NOTE] To solve this problem, you can try the following approaches:
- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
- Ensure the maintainers know of this problem (e.g. creating a bug report if needed)
or even helping with a fix (e.g. by creating a pull request):
- bar@1.0.0
- Repository: https://example.com/
- Detailed warning command: `cargo report future-incompatibilities --id 1 --package bar@1.0.0`
- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
- Use your own version of the dependency with the `[patch]` section in `Cargo.toml`.
For more information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
[NOTE] this report can be shown with `cargo report future-incompatibilities --id 1`
@ -742,18 +725,15 @@ https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch
[WARNING] the following packages contain code that will be rejected by a future version of Rust: bar v1.0.0
[NOTE] To solve this problem, you can try the following approaches:
- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
- Ensure the maintainers know of this problem (e.g. creating a bug report if needed)
or even helping with a fix (e.g. by creating a pull request):
- bar@1.0.0
- Repository: https://example.com/
- Detailed warning command: `cargo report future-incompatibilities --id 1 --package bar@1.0.0`
- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
- Use your own version of the dependency with the `[patch]` section in `Cargo.toml`.
For more information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
[NOTE] this report can be shown with `cargo report future-incompatibilities --id 1`