-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
cargo new: Confusing error message about adding to a workspace #13985
Comments
I assume this issue should be about I also assume some steps are missing and that to reproduce, we need to |
I'm assuming Steps (2) and (3) are supposed to be done after We even have a test case showing this problem: |
Yes, sorry, it is |
It's my bad, I'm so sorry for that. Can't remember why I forced this change without checking it. |
fix(new): Dont say were adding to a workspace when a regular package is in root Fixes #13985
Problem
cargo add
seems to generate a confusing message about adding a package to a workspace when there is no workspace, and it isn't actually added to the workspace.Steps
cargo new foo
cd foo
cargo new bar
This prints: Adding
bar
as member of workspace at/Temp/foo
cargo metadata | jq .workspace_members
Notice that
bar
was not added as a workspace member. Also notice that foo'sCargo.toml
was not modified.Possible Solution(s)
Should not print a message about adding
bar
to a workspace when it isn't actually added.Notes
No response
Version
The text was updated successfully, but these errors were encountered: