-
Notifications
You must be signed in to change notification settings - Fork 924
cargo fmt --package: not a member of workspace (Implicit workspace) #3643
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
Comments
I think that we just need to dig a litter deeper into the data returned from |
I took a look at this one, and detailed my findings below. I personally feel like there's two items here, and what is described above is the expected behavior when using Following the example outlined above: If you run Accordingly, when It doesn't matter that there's a difference in the package name and directory name for As noted in the OP, if you declare a I think the problem with |
Believe I have a fix for |
Closed via #3664. |
Tested both in current stable & nightly
Steps to reproduce
cargo new cargo-fmt-test && cd cargo-fmt-test
cargo new --lib --name dependency-crate-name dependency-dir-name
dependency-crate-name = { path = "dependency-dir-name" }
to dependencies inCargo.toml
So, we have a path dependency with a directory name different than crate name. Looks like it is only broken if names differ.
Also, these steps do not create
[workspace]
section inCargo.toml
, so this is an implicit workspace or something. If[workspace]
is present, then it looks likecargo fmt
works correctly.cargo fmt --all
^This should format the dependency as well, but it does not
cargo fmt --package dependency-crate-name
^ So,
cargo-fmt
does not see the dependency as part of the workspace.Also there is usage output for some reason
Default cargo subcommands do work (like
cargo test --package dependency-crate-name
).The text was updated successfully, but these errors were encountered: