You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the plain cargo machete call in the pre-commit hook (and CI) with cargo machete --with-metadata, then remove the ~15 unused dev dependencies that this
stricter mode reveals across the workspace.
Background
During a coupling analysis review, four workspace dependencies were found to have zero references
in any source file:
Running cargo machete (plain, text-based scan) did not flag these — a false negative. Only cargo machete --with-metadata correctly identifies them as unused. The same run also reveals
about a dozen additional unused dev dependencies spread across the workspace (e.g., local-ip-address, mockall, rstest, async-std, criterion, pretty_assertions, serde_bytes, zerocopy, tracing-subscriber, formatjson, serde_json).
Switching to --with-metadata makes the gate accurate and removes dead weight from Cargo.toml
files across the workspace.
Spec
Full specification: docs/issues/open/ (see spec file for this issue number).
Goal
Replace the plain
cargo machetecall in the pre-commit hook (and CI) withcargo machete --with-metadata, then remove the ~15 unused dev dependencies that thisstricter mode reveals across the workspace.
Background
During a coupling analysis review, four workspace dependencies were found to have zero references
in any source file:
bittorrent-tracker-core→torrust-rest-tracker-api-client[dev]bittorrent-udp-tracker-core→torrust-tracker-test-helpers[dev]torrust-axum-http-tracker-server→torrust-tracker-events[dev]torrust-tracker-swarm-coordination-registry→torrust-tracker-test-helpers[dev]Running
cargo machete(plain, text-based scan) did not flag these — a false negative. Onlycargo machete --with-metadatacorrectly identifies them as unused. The same run also revealsabout a dozen additional unused dev dependencies spread across the workspace (e.g.,
local-ip-address,mockall,rstest,async-std,criterion,pretty_assertions,serde_bytes,zerocopy,tracing-subscriber,formatjson,serde_json).Switching to
--with-metadatamakes the gate accurate and removes dead weight fromCargo.tomlfiles across the workspace.
Spec
Full specification:
docs/issues/open/(see spec file for this issue number).Related
workspace-couplingreport tool overhaul