TimonPost / cargo-unused-features

Find potential unused enabled feature flags and prune them.
MIT License
230 stars 10 forks source link

Report does not contain Crate if all Features are "Used" #17

Open Redfire75369 opened 9 months ago

Redfire75369 commented 9 months ago

Describe the bug When removing all features of a specific crate fails with Failed to compile without feature flag. error: ..., the following code prevents the report from containing the crate. https://github.com/TimonPost/cargo-unused-features/blob/315fb128a9742dda8a9a143124f914c49fcb781a/src/subcommands/analyze.rs#L236

Although the behaviour is fine, there should be indication through the CLI output that no features could be pruned so it wasn't included in the output. Especially in workspaces, this may lead to confusion as the report json is written but does not contain the crate.

Provide the following information