Repository navigation
chore(release): replace cargo version tooling - #11323
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRelease automation now resolves and rewrites crate manifest versions directly, updates the matching path dependency, and synchronizes Cargo metadata offline. The new helpers are used across subcrate and main ChangesRelease versioning
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ReleaseScript
participant CargoMetadata
participant CargoManifest
participant Cargo
ReleaseScript->>CargoMetadata: resolve current package version
ReleaseScript->>CargoManifest: rewrite package and path dependency versions
ReleaseScript->>Cargo: apply offline precise update
Possibly related PRs
Suggested labels: 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 |
Greptile SummaryReplaces the release workflow’s cargo-edit dependency with a local Cargo metadata-based version helper.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (10): Last reviewed commit: "docs(config): remove stale cargo-edit ex..." | Re-trigger Greptile |
e52980e to
c66dfcd
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@xtasks/release-plz`:
- Line 153: Update the release version logic around the cargo release invocation
to compare the CalVer candidate "$year.$month.0" with the current crate or mise
version before selecting the bump. If the candidate is not greater, use a patch
bump instead of passing the lower explicit version; otherwise preserve the
existing explicit CalVer release behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 8639da64-39ee-4217-adb6-e326fba3495b
⛔ Files ignored due to path filters (1)
mise.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
mise.tomlxtasks/release-plz
💤 Files with no reviewable changes (1)
- mise.toml
76dec10 to
8b4757e
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@xtasks/release-plz`:
- Around line 106-155: Restore monotonic version protection for CalVer reset
paths: before passing "$year.$month.0" to set_package_version, compare it with
the package’s current version and only use it when strictly greater. Update
bump_subcrate_if_changed, bump_and_publish_subcrate, and the main mise branch to
fall back to bump_package_version ... patch when the candidate is not greater,
preventing silent downgrades while preserving normal resets.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 359f6452-f05f-4e62-964d-2922242de549
⛔ Files ignored due to path filters (1)
mise.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
mise.tomlxtasks/release-plz
💤 Files with no reviewable changes (1)
- mise.toml
d3b9d0e to
3a4c0f5
Compare
Avoid overlapping that PR's mise.toml/lock tool cleanup; keep the dead [release] task and nix leftover fixes here. Co-authored-by: Taku Kodama <risu729@users.noreply.github.com>
Avoid overlapping that PR's mise.toml/lock tool cleanup; keep the dead [release] task and nix leftover fixes here. Co-authored-by: Taku Kodama <risu729@users.noreply.github.com>
c216db4 to
230cacc
Compare
Avoid overlapping that PR's mise.toml/lock tool cleanup; keep the dead [release] task and nix leftover fixes here. Co-authored-by: Taku Kodama <risu729@users.noreply.github.com>
Summary
cargo set-versionwith a small local release helper using Cargo metadata, jq, sed, andcargo update --preciseWhy
The release workflow only used cargo-edit for package version changes. Replacing that narrow use avoids requiring a separately installed Cargo tool while preserving the existing release behavior.
Standard Cargo does not provide
set-version. Jq cannot write TOML directly, so the helper reads package versions from structuredcargo metadata, performs checked replacements on the explicitly supplied manifest, and delegatesCargo.lockupdates back tocargo update --precise.This workspace has one constrained path dependency that also needs its version requirement updated: the root dependency on
mise-interactive-config. Handling that known case explicitly keeps the release script small and makes its fixed-workspace assumptions visible.Like
cargo set-version, direct version assignments reject versions that are not greater than the current version. CalVer reset paths compare numeric version tuples and fall back to a patch bump when the runner date would otherwise move a package backwards.Validation
cargo set-versionin clean worktrees for explicit versions, patch bumps, and minor bumps acrossmise,vfox, andmise-interactive-config; all six cases produced identical Git diffsmise run lint-fixshfmt -d xtasks/release-plzshellcheck -x xtasks/release-plzbash -n xtasks/release-plztaplo check mise.toml mise.lockgit diff --checkRelated