Skip to content

Commit 8488e51

Browse files
committed
Improve resolver version mismatch warning
fixes: #12557
1 parent 2a6f7f6 commit 8488e51

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/cargo/core/workspace.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,11 +1021,18 @@ impl<'cfg> Workspace<'cfg> {
10211021
.max()
10221022
{
10231023
let resolver = edition.default_resolve_behavior().to_manifest();
1024-
self.config.shell().warn(format_args!("some crates are on edition {edition} which defaults to `resolver = \"{resolver}\"`, but virtual workspaces default to `resolver = \"1\"`"))?;
1024+
self.config.shell().warn(format_args!(
1025+
"virtual workspace defaulting to `resolver = \"1\"` despite one or more workspace members being on edition {edition} which implies `resolver = \"{resolver}\"`"
1026+
))?;
10251027
self.config.shell().note(
10261028
"to keep the current resolver, specify `workspace.resolver = \"1\"` in the workspace root's manifest",
10271029
)?;
1028-
self.config.shell().note(format_args!("to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"` in the workspace root's manifest"))?;
1030+
self.config.shell().note(format_args!(
1031+
"to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"` in the workspace root's manifest"
1032+
))?;
1033+
self.config.shell().note(
1034+
"for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions",
1035+
)?;
10291036
}
10301037
}
10311038
}

0 commit comments

Comments
 (0)