Skip to content

chore(release): replace cargo version tooling - #11323

Merged
jdx merged 4 commits into
jdx:mainfrom
risu729:agent/remove-cargo-edit
Jul 26, 2026
Merged

jdx merged 4 commits into
jdx:mainfrom
risu729:agent/remove-cargo-edit

Conversation

@risu729

@risu729 risu729 commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • replace cargo set-version with a small local release helper using Cargo metadata, jq, sed, and cargo update --precise
  • pass each package manifest explicitly and keep the one constrained workspace path dependency in sync
  • preserve monotonic version updates, including clock-skew fallback to a patch bump
  • remove cargo-edit from the project tools and lockfile

Why

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 structured cargo metadata, performs checked replacements on the explicitly supplied manifest, and delegates Cargo.lock updates back to cargo 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

  • compared the replacement against cargo set-version in clean worktrees for explicit versions, patch bumps, and minor bumps across mise, vfox, and mise-interactive-config; all six cases produced identical Git diffs
  • verified a lower CalVer candidate produces the same diff as a patch bump
  • verified a direct downgrade is rejected before mutating the worktree
  • mise run lint-fix
  • shfmt -d xtasks/release-plz
  • shellcheck -x xtasks/release-plz
  • bash -n xtasks/release-plz
  • taplo check mise.toml mise.lock
  • git diff --check

Related

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Release 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 mise calver bump paths, while two obsolete mise tool entries are removed.

Changes

Release versioning

Layer / File(s) Summary
Manifest version helpers
xtasks/release-plz
Adds helpers to resolve package versions, validate and rewrite manifest versions, update the matching workspace path dependency, and run offline Cargo updates.
Release path integration
xtasks/release-plz, mise.toml
Subcrate, retry, and main mise calver branches use the new helpers, and the cargo:cargo-edit and cargo-release tool entries are removed.

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
Loading

Possibly related PRs

  • jdx/mise#11133: Modifies the same xtasks/release-plz subcrate and version-bumping flow.

Suggested labels: release

Poem

A rabbit hops through versions bright,
Rewriting crates by candlelight.
Cargo updates, paths align,
Calver bumps fall into line.
Thump-thump—the release is fine!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title accurately summarizes the main change: replacing cargo version tooling in the release flow.

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.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Replaces the release workflow’s cargo-edit dependency with a local Cargo metadata-based version helper.

  • Adds checked package-version comparison, manifest updates, lockfile synchronization, and clock-skew fallback behavior.
  • Explicitly synchronizes the constrained mise-interactive-config workspace dependency.
  • Removes cargo-edit from the development tool configuration and updates generated CLI examples.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
xtasks/release-plz Adds local functions for reading, comparing, and updating package versions and replaces all cargo set-version calls.
mise.toml Removes cargo-edit from the repository’s configured development tools.
mise.lock Removes the corresponding locked cargo-edit tool entry.
src/cli/config/ls.rs Updates the config-listing help example to reflect the removal of cargo-edit.
mise.usage.kdl Updates generated usage examples to reflect the current tool configuration.

Reviews (10): Last reviewed commit: "docs(config): remove stale cargo-edit ex..." | Re-trigger Greptile

@risu729
risu729 force-pushed the agent/remove-cargo-edit branch from e52980e to c66dfcd Compare July 26, 2026 11:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between e52980e and c66dfcd.

⛔ Files ignored due to path filters (1)
  • mise.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • mise.toml
  • xtasks/release-plz
💤 Files with no reviewable changes (1)
  • mise.toml

Comment thread xtasks/release-plz Resolved
@risu729
risu729 force-pushed the agent/remove-cargo-edit branch 2 times, most recently from 76dec10 to 8b4757e Compare July 26, 2026 12:07
@risu729 risu729 changed the title chore(release): replace cargo set-version chore(release): replace cargo version tooling Jul 26, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between c66dfcd and 8b4757e.

⛔ Files ignored due to path filters (1)
  • mise.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • mise.toml
  • xtasks/release-plz
💤 Files with no reviewable changes (1)
  • mise.toml

Comment thread xtasks/release-plz Resolved
@risu729
risu729 force-pushed the agent/remove-cargo-edit branch 3 times, most recently from d3b9d0e to 3a4c0f5 Compare July 26, 2026 17:36
@risu729
risu729 marked this pull request as ready for review July 26, 2026 18:10
cursor Bot pushed a commit to risu729/mise that referenced this pull request Jul 26, 2026
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>
risu729 added a commit to risu729/mise that referenced this pull request Jul 26, 2026
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>
risu729 added a commit to risu729/mise that referenced this pull request Jul 26, 2026
@risu729
risu729 marked this pull request as draft July 26, 2026 20:46
@risu729
risu729 force-pushed the agent/remove-cargo-edit branch from c216db4 to 230cacc Compare July 26, 2026 20:56
risu729 added a commit to risu729/mise that referenced this pull request Jul 26, 2026
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>
risu729 added a commit to risu729/mise that referenced this pull request Jul 26, 2026
@risu729
risu729 marked this pull request as ready for review July 26, 2026 20:58
@jdx
jdx enabled auto-merge (squash) July 26, 2026 21:28
@jdx
jdx merged commit 97bd429 into jdx:main Jul 26, 2026
34 checks passed
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.

2 participants