-
Notifications
You must be signed in to change notification settings - Fork 657
feat(risedev): add check-udeps
#7836
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
Conversation
`cargo udeps` (which uses `cargo check` internally) is slower but more accurate than `cargo machete` (which uses `ripgrep` internallly) to check unused dependencies. Actually `cargo machete` is good enough, but it doesn't support excluding packages, so it doesn't work well with `workspace-hack` and requires some manual work. So I'd like to a script using `cargo-udeps` for future usage.
e8a83c4
to
3967274
Compare
Codecov Report
@@ Coverage Diff @@
## main #7836 +/- ##
==========================================
- Coverage 71.74% 71.73% -0.01%
==========================================
Files 1109 1109
Lines 176822 176822
==========================================
- Hits 126856 126848 -8
- Misses 49966 49974 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
src/common/Cargo.toml
Outdated
@@ -10,6 +10,9 @@ repository = { workspace = true } | |||
[package.metadata.cargo-machete] | |||
ignored = ["workspace-config", "workspace-hack", "task_stats_alloc"] | |||
|
|||
[package.metadata.cargo-udeps.ignore] | |||
normal = ["workspace-config", "workspace-hack", "task_stats_alloc"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no dependency on workspace-config
and task_stats_alloc
for library crates. 🤔 Maybe we only add them to the ignored list of cmd
and cmd_all
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, such a lazy boy I am 🫣
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
cargo udeps
(which usescargo check
internally) is slower but more accurate thancargo machete
(which usesripgrep
internallly) to check unused dependencies.Actually
cargo machete
is good enough, but it doesn't support excluding packages, so it doesn't work well withworkspace-hack
and requires some manual work. So I'd like to a script usingcargo-udeps
for future usage.