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

bad error message for crate not part of a workspace inside a directory spanning a workspace #5421

Closed
gnzlbg opened this issue Apr 27, 2018 · 1 comment

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Apr 27, 2018

I have a workspace with a couple of crates, and want to add a new crate inside the directory which is not part of the workspace. I get following error message:

error: current package believes it's in a workspace when it's not:
current:   /workspace/foo/Cargo.toml
workspace: /workspace/Cargo.toml

this may be fixable by adding `foo` to the `workspace.members` array of the manifest located at: /workspace/Cargo.toml

The error message suggest the alternative of making the crate part of the workspace, but this is not what I want. It should also suggest how to make the current package not believe that it is in a workspace.

The way I solved it is by adding the following to the foo crate's Cargo.toml;

[workspace] 
members = [] 

EDIT: Arnavion suggested on IRC that this is actually a bug and how I solved this just a workaround.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Apr 27, 2018

Duplicate of #5418 .

@gnzlbg gnzlbg closed this as completed Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant