Skip to content

[CHORE]: Add cargo-shear dependency hygiene to Rust CI #5394

Description

@lucarlig

🔧 Chore Summary

Add cargo-shear to Rust CI so unused dependencies fail fast, and remove or reclassify the unused crate entries detected by the new check.


🧱 Area Affected

Choose the general area(s) that this chore affects:

  • GitHub Actions / CI Pipelines
  • Pre-commit hooks / linters
  • Formatting (black, isort, ruff, etc.)
  • Type-checking (mypy, pyright, pytype, etc.)
  • Dependency cleanup or updates
  • Build system or Makefile
  • Containerization (Docker/Podman)
  • Docs or spellcheck
  • SBOM, CVE scans, licenses, or security checks
  • Other:

⚙️ Context / Rationale

Rust manifests can accumulate stale dependencies that increase review noise, compile surface, and maintenance overhead. A CI check keeps dependency hygiene enforceable across the workspace.


📦 Related Make Targets

  • make rust-unused-deps - run cargo-shear across the Rust workspace
  • make rust-check - include the unused dependency check with the existing Rust checks

📋 Acceptance Criteria

  • cargo-shear runs in Rust CI
  • Unused Rust dependencies are removed or moved to the correct manifest section
  • Rust checks pass with no dependency usage warnings

🧩 Additional Context

Use cargo-shear 1.13.1 with --locked --deny-warnings so CI uses the lockfile and treats dependency hygiene findings as failures.

Metadata

Metadata

Assignees

Labels

choreLinting, formatting, dependency hygiene, or project maintenance choresdevopsDevOps activities (containers, automation, deployment, makefiles, etc)rustRust programmingtriageIssues / Features awaiting triage

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions