fix(ci): unblock releases by cutting usage-derive's dev-dependency - #811
Conversation
The release job has failed on every run since usage-derive became
publishable:
failed to select a version for `usage-argv`
package `usage-derive` depends on `usage-argv` with feature `spec`
but `usage-argv` does not have that feature
usage-argv 5.1.0 went to crates.io before the `spec` feature existed, and
crates.io versions are immutable, so nothing at 5.1.0 can ever depend on
that feature. `cargo publish` resolves dev-dependencies against the
registry, so usage-derive was unpublishable — and the failure came before
the release PR that would have bumped the version, leaving the pipeline
stuck rather than merely delayed.
The dev-dependency is gone rather than worked around. A proc-macro that
dev-depends on the runtime it emits code for recreates this cycle every
time that runtime gains a feature mid-version; serde_derive avoids it the
same way. This crate emits tokens and links nothing, so it now depends on
usage-argv not at all.
Its crate-level example moves to conformance/tests/derive.rs, where the
derive is tested anyway, so it is still compiled and run rather than
becoming an `ignore` block nobody checks. Both sides point at each other.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe derive documentation example is marked as ignored and validated through a new conformance test. The derive crate no longer declares the ChangesDerive documentation example validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
conformance/tests/derive.rs (1)
496-505: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover the untested derive attributes.
The test always supplies
-j8, so it never exercisesenv = "EX_JOBS"ordefault = "4". It only checksverbose == 0, so it does not verify repeated-vvalues forcount.--no-coloralso bypasses thecolordefault. Add isolated cases for these paths. Restore or isolateEX_JOBSso the test remains deterministic.Also applies to: 511-518
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@conformance/tests/derive.rs` around lines 496 - 505, Expand the derive tests around the jobs, verbose, and color fields to independently exercise the EX_JOBS environment fallback, the jobs default of "4", repeated -v counting, and the color default versus --no-color behavior. Ensure EX_JOBS is cleared or scoped per case so environment state cannot affect test results, while preserving the existing explicit argument coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@conformance/tests/derive.rs`:
- Around line 496-505: Expand the derive tests around the jobs, verbose, and
color fields to independently exercise the EX_JOBS environment fallback, the
jobs default of "4", repeated -v counting, and the color default versus
--no-color behavior. Ensure EX_JOBS is cleared or scoped per case so environment
state cannot affect test results, while preserving the existing explicit
argument coverage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 47875ef4-e296-4c76-9654-ed3251d05435
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
conformance/tests/derive.rsderive/Cargo.tomlderive/src/lib.rs
Greptile SummaryThe PR removes usage-derive's publish-blocking development dependency on usage-argv and relocates its documentation example into the conformance suite.
Confidence Score: 5/5The PR appears safe to merge, with the removed dependency adequately replaced by an executable conformance test. The derive crate has no remaining compiled test or build target requiring usage-argv, while the moved example has the required runtime feature and is exercised by the workspace CI test command. Important Files Changed
Reviews (1): Last reviewed commit: "fix(ci): unblock releases by cutting usa..." | Re-trigger Greptile |
This is the failure you linked, and it's mine. The release job has failed on every run since usage-derive became publishable:
What happened
usage-argv 5.1.0was published in #798, before #801 added itsspecfeature. crates.io versions are immutable, so no crate at 5.1.0 can ever depend on that feature — andcargo publishresolves dev-dependencies against the registry, so usage-derive could not be packaged at all.Worse than a delay: the failure happens in the catch-up publish, before the step that opens the release PR — so the version never bumps, and the pipeline stays stuck instead of fixing itself on the next run.
The fix
The dev-dependency is gone, not worked around. A proc-macro that dev-depends on the runtime it emits code for recreates this cycle every time that runtime gains a feature mid-version, and
serde_deriveavoids it the same way. This crate emits tokens and links nothing, so it now depends on usage-argv not at all.Its crate-level example would have become an
ignoreblock nobody checks, so it moved toconformance/tests/derive.rsas a real test — compiled and run, with both sides pointing at each other so they cannot drift.Verified the actual thing that was broken:
Worth knowing for next time
The general trap is shared-version publishing plus "publish whatever is not yet on crates.io": a feature added to a crate after its version was published is invisible to the registry, so any dependent needing that feature is unpublishable until the version moves. It bit a dev-dependency this time, which is why cutting it is a complete fix — but a real dependency in the same position would need the bump.
AI-assisted — Tool: Claude Code; model: anthropic/claude-fable-5; version: unavailable.
Note
Cursor Bugbot is generating a summary for commit da8aa07. Configure here.
Summary by CodeRabbit
Tests
Documentation