[worker:deadcode:rust] remove unused libc and dirs deps - #518
Merged
norrietaylor merged 1 commit intoJun 22, 2026
Merged
Conversation
cargo-machete flagged minimal2::libc and sessions::dirs as unused dependency declarations. Verified neither crate references the crate in source: minimal2 has no libc:: usage (the only "libc" match is the "libcgroups=off" tracing env-filter string), and sessions references dirs only in doc comments. Both workspace deps stay declared at the root for the other crates that do use them. Refs: #430 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughTwo unused workspace dependencies are removed: ChangesUnused dependency removal
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
norrietaylor
enabled auto-merge (squash)
June 22, 2026 20:53
norrietaylor
approved these changes
Jun 22, 2026
norrietaylor
deleted the
chore/deadcode-remove-unused-libc-dirs-f803955a2afdbb26
branch
June 22, 2026 20:53
This was referenced Jun 29, 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.
Resolves the high-confidence (cargo-machete
dep) candidates from the dead-code audit by dropping two unused dependency declarations. The remaining candidates in the issue (the prost/tonic protobuf family andminimald::chrono) are kept per the issue's own triage — codegen-driven and public-API re-export usage that machete cannot see.Removed deps
minimal2->libc: nolibc::usage anywhere in the crate. The onlylibcsubstring match is the"libcgroups=off"tracing env-filter directive, which is unrelated to the crate.sessions->dirs: referenced only in doc comments (//! dirs::home_dir ...); nouse dirs/dirs::in code.Both crates remain declared at the workspace root (
libc = "0.2",dirs = "6") because other crates (common, minimald, minvmd, lcache, mctx, minimal, minimal2's owndirs) still use them. Only the per-crate[dependencies]lines were removed;Cargo.lockis regenerated and committed.Verification
cargo build --workspace --all-targetsself-check passed (exit 0) from./target— bothminimal2andsessionscompile without the removed deps.cargo fmt --allapplied as the final step (no.rschanges).cargo fmt --all --check,cargo build --workspace --all-targets --locked,cargo clippy --workspace --all-targets --locked -- -D warnings, andcargo test --workspace --all-targets --locked.Closes #430
Summary by CodeRabbit