mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
fix(resolver): Prefer rust-version over schema version
This commit is contained in:
parent
06b5ec5765
commit
0ed5c215a2
@ -362,6 +362,16 @@ pub(super) fn activation_error(
|
|||||||
let _ = writeln!(&mut msg, " version {} is not cached", summary.version());
|
let _ = writeln!(&mut msg, " version {} is not cached", summary.version());
|
||||||
}
|
}
|
||||||
IndexSummary::Unsupported(summary, schema_version) => {
|
IndexSummary::Unsupported(summary, schema_version) => {
|
||||||
|
if let Some(rust_version) = summary.rust_version() {
|
||||||
|
// HACK: technically its unsupported and we shouldn't make assumptions
|
||||||
|
// about the entry but this is limited and for diagnostics purposes
|
||||||
|
let _ = writeln!(
|
||||||
|
&mut msg,
|
||||||
|
" version {} requires cargo {}",
|
||||||
|
summary.version(),
|
||||||
|
rust_version
|
||||||
|
);
|
||||||
|
} else {
|
||||||
let _ = writeln!(
|
let _ = writeln!(
|
||||||
&mut msg,
|
&mut msg,
|
||||||
" version {} requires a Cargo version that supports index version {}",
|
" version {} requires a Cargo version that supports index version {}",
|
||||||
@ -371,6 +381,7 @@ pub(super) fn activation_error(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if !name_candidates.is_empty() {
|
} else if !name_candidates.is_empty() {
|
||||||
let _ = writeln!(&mut msg, "no matching package found",);
|
let _ = writeln!(&mut msg, "no matching package found",);
|
||||||
let _ = writeln!(&mut msg, "searched package name: `{}`", dep.package_name());
|
let _ = writeln!(&mut msg, "searched package name: `{}`", dep.package_name());
|
||||||
|
@ -3267,7 +3267,7 @@ fn unknown_index_version_with_msrv_error() {
|
|||||||
.with_stderr_data(str![[r#"
|
.with_stderr_data(str![[r#"
|
||||||
[UPDATING] `dummy-registry` index
|
[UPDATING] `dummy-registry` index
|
||||||
[ERROR] no matching versions for `bar` found
|
[ERROR] no matching versions for `bar` found
|
||||||
version 1.0.1 requires a Cargo version that supports index version 4294967295
|
version 1.0.1 requires cargo 1.2345
|
||||||
location searched: `dummy-registry` index (which is replacing registry `crates-io`)
|
location searched: `dummy-registry` index (which is replacing registry `crates-io`)
|
||||||
required by package `foo v0.1.0 ([ROOT]/foo)`
|
required by package `foo v0.1.0 ([ROOT]/foo)`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user