Skip to content

[worker:deadcode:rust] remove unused libc and dirs deps - #518

Merged
norrietaylor merged 1 commit into
mainfrom
chore/deadcode-remove-unused-libc-dirs-f803955a2afdbb26
Jun 22, 2026
Merged

[worker:deadcode:rust] remove unused libc and dirs deps#518
norrietaylor merged 1 commit into
mainfrom
chore/deadcode-remove-unused-libc-dirs-f803955a2afdbb26

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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 and minimald::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: no libc:: usage anywhere in the crate. The only libc substring 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 ...); no use 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 own dirs) still use them. Only the per-crate [dependencies] lines were removed; Cargo.lock is regenerated and committed.

Verification

  • cargo build --workspace --all-targets self-check passed (exit 0) from ./target — both minimal2 and sessions compile without the removed deps.
  • cargo fmt --all applied as the final step (no .rs changes).
  • The non-bypassable host backstop re-runs the full gate before this PR opens: cargo fmt --all --check, cargo build --workspace --all-targets --locked, cargo clippy --workspace --all-targets --locked -- -D warnings, and cargo test --workspace --all-targets --locked.

Closes #430

Generated by Chore-issue worker agent (side-repo-ops operator) ·

Summary by CodeRabbit

  • Chores
    • Removed unused dependencies from multiple project modules to streamline the build process and improve codebase maintainability.

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>
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Two unused workspace dependencies are removed: libc is dropped from crates/minimal2/Cargo.toml and dirs is dropped from crates/sessions/Cargo.toml. No source code, public APIs, or other configuration is modified.

Changes

Unused dependency removal

Layer / File(s) Summary
Remove libc and dirs workspace dependencies
crates/minimal2/Cargo.toml, crates/sessions/Cargo.toml
libc.workspace = true removed from minimal2 and dirs.workspace = true removed from sessions, leaving all other dependency entries intact.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Suggested reviewers

  • norrietaylor

Poem

🐇 Two little packages, no longer needed here,
libc and dirs — their absence brings good cheer!
The manifest grows lean, the build stays bright,
A rabbit tidied up with one swift byte.
Less is more, as any bunny knows! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing unused libc and dirs dependencies from two crates based on a dead-code audit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

@norrietaylor
norrietaylor enabled auto-merge (squash) June 22, 2026 20:53
@norrietaylor
norrietaylor merged commit 161b763 into main Jun 22, 2026
31 checks passed
@norrietaylor
norrietaylor deleted the chore/deadcode-remove-unused-libc-dirs-f803955a2afdbb26 branch June 22, 2026 20:53
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.

[deadcode:rust] 11 dead-code candidates across 3 crates (all false positives)

1 participant