Skip to content

dev: include dependency checks in the local lint suite - #25399

Open
kumarUjjawal wants to merge 1 commit into
apache:mainfrom
kumarUjjawal:dev/21048-local-dependency-checks
Open

kumarUjjawal wants to merge 1 commit into
apache:mainfrom
kumarUjjawal:dev/21048-local-dependency-checks

Conversation

@kumarUjjawal

@kumarUjjawal kumarUjjawal commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

dev/rust_lint.sh does not run the two dependency checks from the "Dependencies" workflow. A contributor finds a dependency cycle or an unused dependency only in CI.

What changes are included in this PR?

  • ci/scripts/check_circular_dependencies.sh runs cargo run --locked in dev/depcheck.
  • ci/scripts/check_unused_dependencies.sh runs cargo machete --with-metadata from the repository root.
  • The workflow calls both scripts. CARGO_MACHETE_VERSION="0.9" moves to ci/scripts/utils/tool_versions.sh, and the workflow loads it from there.
  • dev/rust_lint.sh installs a missing cargo-machete and runs both scripts as read-only steps.
  • docs/source/contributor-guide/testing.md documents the standalone commands.

What is the testing strategy for this PR?

  • In a clean clone, each original command and its wrapper gave identical output with exit 0, and no lockfile changed.
  • A fixture with stubbed steps and tools covered the working directories, exit codes, install path, and fail-fast behavior.
  • The parsed workflow YAML matches main except the changed steps. The full ./dev/rust_lint.sh passes.

Are there any user-facing changes?

No.

Expose the two dependency checks from the "Dependencies" workflow as
shared scripts and run them from `dev/rust_lint.sh` as well, so a
contributor sees a dependency cycle or an unused dependency before
pushing instead of only in CI.

`ci/scripts/check_circular_dependencies.sh` runs `cargo run --locked`
in `dev/depcheck`, which is outside the root workspace and locates the
root manifest from its own directory. `ci/scripts/check_unused_dependencies.sh`
runs `cargo machete --with-metadata` from the repository root and
requires `cargo-machete` without installing it. Both keep their
command's output and exit status.

`CARGO_MACHETE_VERSION="0.9"` moves into the shared tool version file.
The workflow loads it into the environment and passes it to the
existing install action, keeping the same `0.9` series selector. The
lint runner installs a missing `cargo-machete` with `--version ^0.9`,
the range Cargo requires for that selector, and registers both scripts
as read-only steps after the security audit and before the Rust
documentation build.

Job IDs, names, containers, checkout options, action revisions,
triggers, and permissions are unchanged. The depcheck step drops its
`working-directory` because the script enters `dev/depcheck` itself.

Partial progress on apache#21048.
@github-actions github-actions Bot added documentation Improvements or additions to documentation development-process Related to development process of DataFusion labels Sep 17, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.28%. Comparing base (97f7262) to head (947e169).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25399      +/-   ##
==========================================
- Coverage   82.28%   82.28%   -0.01%     
==========================================
  Files        1137     1137              
  Lines      430173   430211      +38     
  Branches   430173   430211      +38     
==========================================
+ Hits       353978   354002      +24     
- Misses      54775    54784       +9     
- Partials    21420    21425       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of DataFusion documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants