-
Notifications
You must be signed in to change notification settings - Fork 220
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
chore(ci): add cargo machete #5323
chore(ci): add cargo machete #5323
Conversation
Does this action just report, or actually change Cargo.toml? If former, will it cause a PR to fail checks if there are unused dependencies? It adds ±2.5 minutes to CI; this is something we could also run nightly as long as it reports properly / creates an issue. |
This just runs a check on the cargo.toml files in the repo. I prefer it running on the pr itself and making sure the offending PR fixes its cargo file. Machete can give false positives, and you need to fix those with exceptions in the cargo files. I prefer the users checking those first before just fixing them. As to the time, I can add it directly to the clippy fix, that might be much quicker run, but will fail as part of clippy and not on its own? |
CON: Since unused dependencies aren't a major issue, it could become annoying to do a push-commit-test cycle to GH for every PR (I have had several complaints about this for clippy & cargo fmt already). Do we really want to add more friction, vs run nightly and (potentially even) automatically create a new issue / new PR (GHP could do this) PRO: On the plus side, I guess we don't add deps that often, so maybe it doesn't come up that much tl;dr - If you include it in the clippy test, I think we can go ahead |
IMO it actually could save on build time because we are not downloading and building unnecessary crates |
Description
Adds cargo machete to check for dependencies
Motivation and Context
Helps keep the dependencies clean