Skip to content

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

Merged
merged 8 commits into from
Feb 11, 2023
Merged

feat(risedev): add check-udeps #7836

merged 8 commits into from
Feb 11, 2023

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Feb 10, 2023

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 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.

@xxchan xxchan requested a review from BugenZhao February 10, 2023 14:53
@github-actions github-actions bot added the type/feature Type: New feature. label Feb 10, 2023
`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.
@xxchan xxchan force-pushed the xxchan/external-salamander branch from e8a83c4 to 3967274 Compare February 10, 2023 14:59
@codecov
Copy link

codecov bot commented Feb 10, 2023

Codecov Report

Merging #7836 (99d1eec) into main (46457dc) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            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     
Flag Coverage Δ
rust 71.73% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/meta/src/hummock/mock_hummock_meta_client.rs 63.45% <0.00%> (-1.02%) ⬇️
src/batch/src/task/task_execution.rs 51.62% <0.00%> (-0.51%) ⬇️
src/common/src/types/ordered_float.rs 30.87% <0.00%> (-0.20%) ⬇️
src/storage/src/hummock/compactor/mod.rs 80.46% <0.00%> (-0.20%) ⬇️
src/meta/src/hummock/manager/mod.rs 78.09% <0.00%> (-0.12%) ⬇️
src/common/src/cache.rs 97.15% <0.00%> (-0.11%) ⬇️
src/source/src/row_id.rs 92.04% <0.00%> (+1.13%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@xxchan xxchan requested a review from TennyZhuang February 10, 2023 16:38
@@ -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"]
Copy link
Member

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?

Copy link
Member Author

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 🫣

@mergify mergify bot merged commit f6028e4 into main Feb 11, 2023
@mergify mergify bot deleted the xxchan/external-salamander branch February 11, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Type: New feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants