Skip to content

Commit

Permalink
Add more suggestions on how to deal with excluding a package from a w…
Browse files Browse the repository at this point in the history
…orkspace.
  • Loading branch information
ehuss committed Apr 1, 2019
1 parent ede459e commit d7a9212
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cargo/core/workspace.rs
Expand Up @@ -660,7 +660,10 @@ impl<'cfg> Workspace<'cfg> {
failure::bail!(
"current package believes it's in a workspace when it's not:\n\
current: {}\n\
workspace: {}\n\n{}",
workspace: {}\n\n{}\n\
Alternatively, to keep it out of the workspace, add the package \
to the `workspace.exclude` array, or add an empty `[workspace]` \
table to the package's manifest.",
self.current_manifest.display(),
root.display(),
extra
Expand Down
3 changes: 3 additions & 0 deletions tests/testsuite/workspaces.rs
Expand Up @@ -314,6 +314,7 @@ current: [..]Cargo.toml
workspace: [..]Cargo.toml
this may be fixable [..]
[..]
",
)
.run();
Expand Down Expand Up @@ -779,6 +780,7 @@ workspace: [..]Cargo.toml
this may be fixable by adding `bar` to the `workspace.members` array of the \
manifest located at: [..]
[..]
",
)
.run();
Expand Down Expand Up @@ -979,6 +981,7 @@ workspace: [..]
this may be fixable by ensuring that this crate is depended on by the workspace \
root: [..]
[..]
[CREATED] library `bar` package
",
)
Expand Down

0 comments on commit d7a9212

Please sign in to comment.