chore(ci): run cargo machete to catch unused dependencies - #2411
Open
7487 wants to merge 2 commits into
Open
Conversation
Remove the dependencies cargo machete reports as genuinely unused, add the false positives to per-crate [package.metadata.cargo-machete] ignored lists with comments, and wire cargo machete into CI and dev/rust_lint.sh. Closes apache#2410 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
andygrove
approved these changes
Sep 2, 2026
Contributor
|
@7487 can you resolve conflicts and update branch, if you are still managing this change? |
# Conflicts: # ballista-cli/Cargo.toml # ballista/core/Cargo.toml Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
@NoahKusaba Done — merged upstream main and resolved the conflicts. Both were against the workspace-dependency refactor: |
NoahKusaba
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #2410.
Rationale for this change
We do not currently check for unused dependencies in CI, so dead manifest entries accumulate — they still get resolved, downloaded, and often compiled. This adds
cargo macheteto the lint surface, following what DataFusion and other Arrow subprojects already do.What changes are included in this PR?
Removed dependencies that are genuinely unused (no references anywhere in the source tree):
ballista-core:aws-config,aws-credential-types(also dropped from thebuild-binaryfeature; S3 support goes throughobject_store's own builders),md-5,prost-typesballista-scheduler:prost-typesballista-executor:tracing(also dropped from thebuild-binaryfeature;tracing-subscriber/tracing-appenderpull it in transitively)ballista-cli:tracing-appender(also dropped from thetuifeature)pyballista:async-traitprost-types(no longer referenced by any member)Moved: scheduler's
instafrom[dependencies]to[dev-dependencies]— it is only used throughballista_core::assert_plan!incfg(test)modules, so it no longer compiles into release scheduler builds.Kept, with
[package.metadata.cargo-machete]ignored entries and comments:ballista-scheduler:insta(macro expansion, see above) andtonic-prost(used by thekeda-scalergRPC code generated intoOUT_DIR, which machete cannot see)ballista-executor:arrow(not imported directly, but pulls arrow'sipc_compressionfeature into the build so shuffle IPC compression — lz4 by default — works through datafusion's arrow re-export)ballista-cli:critical-section(provides the critical-section implementationratatui-coreneeds at link time in the wasm32webbuild)msrvcheck:time(never imported; pins the transitivetimeversion socargokeeps compiling)CI wiring: new
ci/scripts/rust_machete.sh, added todev/rust_lint.sh, and acargo-machetejob in theBallista Rustworkflow (installscargo-machete@0.9.2via the already-pinnedtaiki-e/install-action).Verified locally:
cargo macheteis clean;taplo format --check(0.10.0) passes; the CI clippy commands for the four touched crates pass with-D warnings(including--all-features, which exerciseskeda-scaler);cargo check -p ballista-scheduler -p ballista-executor -p ballista-core -p ballista --no-default-features --lockedpasses; scheduler tests usingassert_plan!still pass;python/Cargo.lockstays in sync (cargo metadata --locked).Are there any user-facing changes?
The implicit
aws-config/aws-credential-typescargo features ofballista-coreno longer exist, andballista-core/ballista-executorlose a few transitive dependencies. No API or behavior changes.🤖 Generated with Claude Code