Skip to content

Commit

Permalink
Auto merge of #6805 - ehuss:hint-workspace-exclude, r=alexcrichton
Browse files Browse the repository at this point in the history
Add more suggestions on how to deal with excluding a package from a workspace.

Closes #5418
  • Loading branch information
bors committed Apr 1, 2019
2 parents 527017f + d7a9212 commit c1384e8
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 c1384e8

Please sign in to comment.