Skip to content

[worker:deadcode:rust] remove unused chrono dependency - #594

Merged
twitchyliquid64 merged 1 commit into
mainfrom
chore/remove-unused-chrono-minimald-6bfac39126e6723d
Jun 29, 2026
Merged

[worker:deadcode:rust] remove unused chrono dependency#594
twitchyliquid64 merged 1 commit into
mainfrom
chore/remove-unused-chrono-minimald-6bfac39126e6723d

Conversation

@gominimal-aw-bot

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

Copy link
Copy Markdown
Contributor

Resolves the agent:deadcode:rust finding in #593 by removing the unused chrono dependency from crates/minimald/Cargo.toml.

What changed

  • Dropped chrono.workspace = true from crates/minimald [dependencies]. A grep across the entire minimald crate for every chrono usage pattern (chrono::, Utc, DateTime, NaiveDate, Datelike, Timelike, ...) found no references — only the substring inside "synchronously"/"asynchronous" comments. The machete HIGH-confidence finding is accurate.
  • Regenerated Cargo.lock; chrono stays as a transitive dependency of other crates, so only minimald's direct edge is removed.

Candidates intentionally NOT changed

The issue also lists prost, prost-types, tonic, and tonic-prost (remote-proto) as HIGH machete dep candidates, with a triage note suggesting they move to [build-dependencies]. These are machete false positives: crates/remote-proto/src/lib.rs pulls the generated protobuf/gRPC code in via include!(concat!(env!("OUT_DIR"), ...)), and that generated code references ::prost::, ::tonic::, and the tonic-prost codec at runtime. machete cannot see those references because they live in OUT_DIR, not in the scanned .rs sources. Moving the four crates to [build-dependencies] (or removing them) would break compilation of remote-proto, so they are left for human review. prost-build/tonic-prost-build are already correctly in [build-dependencies] (the issue notes no action needed).

Verification

  • cargo build -p minimald --all-targets (from ./target) passed (exit 0): minimald and every crate it depends on compile cleanly without chrono. Because chrono was a private dependency of minimald, removing it cannot affect any other crate, so this targeted build fully covers the change.
  • Note: an initial cargo build --workspace --all-targets aborted with No space left on device (os error 28) while linking unrelated test targets — a runner disk-exhaustion limitation, not a compile error from this change. After reclaiming the incremental-compile cache, the targeted build completed successfully.
  • No .rs files were modified, so cargo fmt is a no-op for this change.
  • The host backstop re-runs the full gate (cargo fmt --all --check, cargo build --workspace --all-targets --locked, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --all-targets --locked) before this PR opens.

Closes #593

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

Summary by CodeRabbit

  • Chores
    • Removed an unused dependency declaration from the build configuration.
    • No visible product behavior changed.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Removes the unused chrono.workspace = true dependency from crates/minimald/Cargo.toml. No source code changes.

Remove unused chrono dependency

Layer / File(s) Summary
Remove chrono from minimald
crates/minimald/Cargo.toml
Deletes the chrono.workspace = true line from [dependencies]; chrono has no references in the minimald crate source.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • gominimal/minimal#288: Also removes unused workspace dependencies from crates/minimald/Cargo.toml.
  • gominimal/minimal#518: Similarly removes unused workspace dependency declarations from Cargo.toml files across crates.

Suggested reviewers

  • norrietaylor

Poem

🐇 A line of chrono, left behind,
No timestamps here, no dates to find.
I snipped it out with gentle care,
The manifest is clean and bare.
Hop hop! One less unused snare! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Only the minimald chrono dependency was removed; the linked issue also required dependency fixes in remote-proto that are not shown here. Also move prost, prost-types, tonic, and tonic-prost in crates/remote-proto to [build-dependencies] as required by #593.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing the unused chrono dependency.
Out of Scope Changes check ✅ Passed The change stays within scope by removing the unused chrono dependency and nothing else.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@twitchyliquid64
twitchyliquid64 merged commit 486d6a6 into main Jun 29, 2026
44 checks passed
@twitchyliquid64
twitchyliquid64 deleted the chore/remove-unused-chrono-minimald-6bfac39126e6723d branch June 29, 2026 17:57
gominimal-aw-bot Bot added a commit that referenced this pull request Jul 29, 2026
cargo-machete's hygiene check flagged `either` as declared in
crates/minimald/Cargo.toml with no use in the crate, turning the
nightly-tests hygiene job red. Searching crates/minimald confirms
the crate never references the either crate: every `either`/`Either`
occurrence is the English word inside a comment. Remove the orphaned
declaration, matching prior unused-dep cleanups in minimald (chrono
in #594, nix in #448).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
twitchyliquid64 pushed a commit that referenced this pull request Jul 29, 2026
cargo-machete's hygiene check flagged `either` as declared in
crates/minimald/Cargo.toml with no use in the crate, turning the
nightly-tests hygiene job red. Searching crates/minimald confirms
the crate never references the either crate: every `either`/`Either`
occurrence is the English word inside a comment. Remove the orphaned
declaration, matching prior unused-dep cleanups in minimald (chrono
in #594, nix in #448).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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] 7 dead-code candidates across 2 crates

1 participant