mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
refactor(future): Group shell output
This commit is contained in:
parent
322b82a2e0
commit
acf54a080e
@ -428,14 +428,6 @@ pub fn save_and_display_report(
|
|||||||
.collect();
|
.collect();
|
||||||
let package_vers: Vec<_> = package_ids.iter().map(|pid| pid.to_string()).collect();
|
let package_vers: Vec<_> = package_ids.iter().map(|pid| pid.to_string()).collect();
|
||||||
|
|
||||||
if should_display_message || bcx.build_config.future_incompat_report {
|
|
||||||
drop(bcx.gctx.shell().warn(&format!(
|
|
||||||
"the following packages contain code that will be rejected by a future \
|
|
||||||
version of Rust: {}",
|
|
||||||
package_vers.join(", ")
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
|
|
||||||
let updated_versions = get_updates(bcx.ws, &package_ids).unwrap_or(String::new());
|
let updated_versions = get_updates(bcx.ws, &package_ids).unwrap_or(String::new());
|
||||||
|
|
||||||
let update_message = if !updated_versions.is_empty() {
|
let update_message = if !updated_versions.is_empty() {
|
||||||
@ -503,6 +495,13 @@ https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch
|
|||||||
let saved_report_id =
|
let saved_report_id =
|
||||||
current_reports.save_report(bcx.ws, suggestion_message.clone(), rendered_report);
|
current_reports.save_report(bcx.ws, suggestion_message.clone(), rendered_report);
|
||||||
|
|
||||||
|
if should_display_message || bcx.build_config.future_incompat_report {
|
||||||
|
drop(bcx.gctx.shell().warn(&format!(
|
||||||
|
"the following packages contain code that will be rejected by a future \
|
||||||
|
version of Rust: {}",
|
||||||
|
package_vers.join(", ")
|
||||||
|
)));
|
||||||
|
}
|
||||||
if bcx.build_config.future_incompat_report {
|
if bcx.build_config.future_incompat_report {
|
||||||
if !suggestion_message.is_empty() {
|
if !suggestion_message.is_empty() {
|
||||||
drop(bcx.gctx.shell().note(&suggestion_message));
|
drop(bcx.gctx.shell().note(&suggestion_message));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user