bnjbvr / cargo-machete

Remove unused Rust dependencies with this one weird trick!
MIT License
784 stars 28 forks source link

Handle multiple dependency tables and dependency delimiters #112

Open mkatychev opened 8 months ago

mkatychev commented 8 months ago

Handle multiple dependency tables: https://github.com/bnjbvr/cargo-machete/blob/4fb101d392a35358eefe3b2a5add4c5fe9e1c613/src/main.rs#L268 Handle superset of dependency names: https://github.com/bnjbvr/cargo-machete/blob/4fb101d392a35358eefe3b2a5add4c5fe9e1c613/src/main.rs#L255-L263

mkatychev commented 8 months ago

I'm not sure how much the scanner recuses so cases like this may not be handled:

[target.'cfg(not(some_flag))'.dev-dependencies]
prost.workspace = true
mkatychev commented 8 months ago

crate/build.rs probably also needs to be scanned, it doesn't seem to be the case with this PR