regexident / cargo-modules

Visualize/analyze a Rust crate's internal structure
Mozilla Public License 2.0
988 stars 48 forks source link

Package flag required even when providing a manifest path #321

Open fpoli opened 3 months ago

fpoli commented 3 months ago

Hi! When running cargo-modules orphan --manifest-path=path/to/package/Cargo.toml in a workspace, the output is the following:

Error: Multiple packages present in workspace,
please explicitly select one via --package flag.

Packages present in workspace:
- foo
- bar
- ...

However, I would expect that when providing the manifest path of a specific package, the --package argument should not be necessary.

regexident commented 3 months ago

That's a fair point, indeed. And shouldn't be too hard to fix. I'm heading off to a few weeks of vacation, but feel free to give it a shot in the meanwhile, if you like.