Skip to content

ci: use cargo machete for dependency checks - #11189

Closed
efegokdemir wants to merge 1 commit into
apache:mainfrom
efegokdemir:codex/issue-11166-cargo-machete
Closed

efegokdemir wants to merge 1 commit into
apache:mainfrom
efegokdemir:codex/issue-11166-cargo-machete

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

Summary

Replace the repeated unused_crate_dependencies Clippy checks with a dedicated cargo machete workflow. This makes dependency checking workspace-wide and includes dependencies used by tests and benches, as requested in #11166.

Changes

  • Add a dedicated Dependencies workflow using pinned cargo-machete 0.9.2.
  • Run cargo machete --with-metadata for the complete workspace.
  • Remove the duplicated dependency-lint invocations from the Arrow and PyArrow Clippy jobs while retaining their normal Clippy checks.

Testing

  • cargo machete: passed; no unused dependencies detected.
  • yamllint -d relaxed .github/workflows/arrow.yml .github/workflows/integration.yml .github/workflows/dependencies.yml: passed with existing line-length warnings.
  • git diff --check: passed.
  • cargo machete --with-metadata: attempted locally, but the offline environment lacks cached workspace dependencies; the command completed with dependency-download errors. The CI workflow runs in a populated container and uses the same command.

Notes

  • The workflow uses the same pinned taiki-e/install-action already used by Apache DataFusion for this tool.
  • AI assistance was used during preparation; the changes and validation were reviewed by the submitting contributor.

Fixes #11166

Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
@Jefffrey

Copy link
Copy Markdown
Contributor

closing as i suspect its part of AI spam:

image

not to mention this was not even verified locally properly:

cargo machete --with-metadata: attempted locally, but the offline environment lacks cached workspace dependencies; the command completed with dependency-download errors. The CI workflow runs in a populated container and uses the same command.

i explicitly mention in my original issue it throws false positives, so it seems there was no actual attempt made at verifying this PR locally

@Jefffrey Jefffrey closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use cargo machete for unused dependencies check

2 participants