You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
Is your feature request related to a problem? Please describe.
Yes, it's complicated to detect unused dependencies.
Describe the solution you'd like
Would you be open to adding an integration with cargo machete to highlight unused dependencies in toml files?
Detected unused dependency would be highlighted with potential actions to solve (remove dep, add cargo-machete metadata)
Describe alternatives you've considered
Using udeps (see FAQ)
Using a make target (less ergonomics)
Making another extension (see FAQ)
Downsides:
cargo machete is faillible and has known false positive that can't and won't be fixed. (EG dependencies only used in macros)
=> I think upside of compilation time of not compiling unused deps is worth it.
It might slow down the execution of the extension
=> I think upside of compilation time of not compiling unused deps is worth it.
I don't think crates currently triggers when modifying *.rs files which might become a requirement because a dependency usage can change while modifying code.
FAQ:
Why cargo machete and not cargo udeps?
Speed 🚀 udeps requires compiling the crate which takes some time and can become cubersome when saving cargo.toml files.
Why integrate it within crates and not a custom extension?
Unused dependencies is very small problem and I'm not sure it would be worth the investment to create a extension just for that.
Activate it by default or not?
I think it should be activated by default as developers might not be aware that rustc doesn't warn on unused dependencies (specially since it does so much other things)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Yes, it's complicated to detect unused dependencies.
Describe the solution you'd like
Would you be open to adding an integration with cargo machete to highlight unused dependencies in toml files?
Detected unused dependency would be highlighted with potential actions to solve (remove dep, add cargo-machete metadata)
Describe alternatives you've considered
Downsides:
cargo machete
is faillible and has known false positive that can't and won't be fixed. (EG dependencies only used in macros)=> I think upside of compilation time of not compiling unused deps is worth it.
=> I think upside of compilation time of not compiling unused deps is worth it.
crates
currently triggers when modifying*.rs
files which might become a requirement because a dependency usage can change while modifying code.FAQ:
cargo machete
and notcargo udeps
?Speed 🚀 udeps requires compiling the crate which takes some time and can become cubersome when saving cargo.toml files.
crates
and not a custom extension?Unused dependencies is very small problem and I'm not sure it would be worth the investment to create a extension just for that.
I think it should be activated by default as developers might not be aware that rustc doesn't warn on unused dependencies (specially since it does so much other things)
The text was updated successfully, but these errors were encountered: