Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more suggestions on how to deal with excluding a package from a workspace. #6805

Merged
merged 1 commit into from
Apr 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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