Skip to content

Commit

Permalink
Add notes on how to configure the virtual workspace's resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed May 26, 2023
1 parent 7067d0d commit 9e86985
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cargo/core/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,8 @@ impl<'cfg> Workspace<'cfg> {
\x20 specify the desired resolver version explicitly in the workspace root's manifest\
",
))?;
self.config.shell().note("to keep the current resolver, specify `workspace.resolver = \"1\"`")?;
self.config.shell().note(format_args!("to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"`"))?;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions tests/testsuite/features2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,8 @@ fn edition_2021_workspace_member() {
warning: some crates are on edition 2021 which defaults to `resolver = \"2\"`,
but virtual workspaces default to `resolver = \"1\"`
specify the desired resolver version explicitly in the workspace root's manifest
note: to keep the current resolver, specify `workspace.resolver = \"1\"`
note: to use the edition 2021 resolver, specify `workspace.resolver = \"2\"`
[CHECKING] a v0.1.0 [..]
[FINISHED] [..]
",
Expand Down

0 comments on commit 9e86985

Please sign in to comment.