Skip to content

feat: implement independent versioning for subcrates#7402

Merged
jdx merged 2 commits intomainfrom
chore/release-exclude-unchanged
Dec 18, 2025
Merged

feat: implement independent versioning for subcrates#7402
jdx merged 2 commits intomainfrom
chore/release-exclude-unchanged

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Dec 18, 2025

Summary

  • Add --exclude-unchanged flag to manual cargo release command
  • Implement independent versioning for subcrates (vfox, aqua-registry) in xtasks/release-plz
  • Only bump and publish subcrates when they have actual changes
  • Create separate git tags for subcrate releases (e.g., vfox-v2025.1.0)
  • Subcrates use calver (YYYY.M.PATCH) independently from mise

Changes

  • tasks.toml: Add --exclude-unchanged to cargo release
  • xtasks/release-plz:
    • Add has_crate_changes() to detect changes since last subcrate tag
    • Add has_uncommitted_changes() for prep phase change detection
    • Add bump_subcrate_if_changed() for prep phase version bumps
    • Add bump_and_publish_subcrate() for release phase with independent versioning
    • Update both release and prep phases to use independent subcrate versioning

Test plan

  • Verify syntax with bash -n xtasks/release-plz
  • Test in CI with a release cycle

🤖 Generated with Claude Code


Note

Release flow now detects changes per subcrate to decide publish/bump/tag, and cargo release runs with --exclude-unchanged.

  • Release automation:
    • Add change detection for subcrates (vfox, aqua-registry) via latest git tag comparison and crates.io queries.
    • Introduce helpers: has_crate_changes, get_latest_crates_version, has_uncommitted_changes, bump_subcrate_if_changed, bump_and_publish_subcrate.
    • Auto-calver bump (YYYY.M.PATCH), publish only when changed, create per-subcrate tags (<crate>-v<version>), and push all tags.
    • After updating embedded registries/plugins, conditionally bump subcrate versions and cargo add pinned versions.
    • Ensure script runs only in GitHub Actions; set git user config.
  • Tasks:
    • Update tasks.toml release task to cargo release --exclude-unchanged.

Written by Cursor Bugbot for commit 7c91b95. This will update automatically on new commits. Configure here.

Add --exclude-unchanged flag to cargo release command to avoid
publishing vfox and aqua-registry crates when they have no changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings December 18, 2025 23:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the release process by adding the --exclude-unchanged flag to the cargo release command. This ensures that only crates with changes since their last tagged release are published, avoiding unnecessary republication of unchanged subcrates like vfox and aqua-registry.

Key Changes:

  • Updated the release task configuration to skip publishing unchanged crates during releases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add helper functions to detect changes in subcrate directories
- Only bump and publish subcrates (vfox, aqua-registry) when they have changes
- Create separate git tags for subcrate releases (e.g., vfox-v2025.1.0)
- Update mise dependencies to use actual subcrate versions
- Subcrates use calver (YYYY.M.PATCH) independently from mise

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jdx jdx changed the title chore: skip publishing unchanged subcrates during release feat: implement independent versioning for subcrates Dec 18, 2025
else
# New year
cargo set-version "$year.1.0" -p "$crate_name"
fi
Copy link

Choose a reason for hiding this comment

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

Bug: Subcrate versions double-bumped during release with changes

When subcrates have changes, the version is bumped twice: once in the prep phase by bump_subcrate_if_changed (checking uncommitted changes) and again in the release phase by bump_and_publish_subcrate (checking changes since last tag). The prep phase commits the version bump to the PR, and after merge, the release phase detects these committed changes as "changes since last tag" and bumps again. This causes versions to increment by 2 (e.g., 2025.11.0 → 2025.12.0 → 2025.12.1) instead of 1, resulting in version gaps for subcrates with changes.

Additional Locations (1)

Fix in Cursor Fix in Web

@github-actions
Copy link

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.12 x -- echo 20.1 ± 0.5 19.0 23.7 1.00
mise x -- echo 20.9 ± 0.4 19.8 22.2 1.04 ± 0.03

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.12 env 19.5 ± 0.7 18.4 23.2 1.00
mise env 20.1 ± 0.9 18.6 22.3 1.03 ± 0.06

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.12 hook-env 19.4 ± 1.0 18.3 36.7 1.01 ± 0.06
mise hook-env 19.2 ± 0.5 18.5 23.0 1.00

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.12 ls 17.0 ± 0.6 16.2 21.6 1.00 ± 0.05
mise ls 17.0 ± 0.5 16.3 20.9 1.00

xtasks/test/perf

Command mise-2025.12.12 mise Variance
install (cached) 109ms 110ms +0%
ls (cached) 65ms 66ms -1%
bin-paths (cached) 72ms 72ms +0%
task-ls (cached) 2258ms ✅ 281ms +703%

✅ Performance improvement: task-ls cached is 703%

@jdx jdx merged commit 1fa8135 into main Dec 18, 2025
30 checks passed
@jdx jdx deleted the chore/release-exclude-unchanged branch December 18, 2025 23:32
jekis913 added a commit to jekis913/mise that referenced this pull request Dec 19, 2025
* upstream/renovate/lockfile-maintenance:
  chore(deps): lock file maintenance
  fix(ci): improve GHA cache efficiency and fix registry-ci bug (jdx#7404)
  feat(tera): add haiku() function for random name generation (jdx#7399)
  feat: implement independent versioning for subcrates (jdx#7402)
  docs: add comprehensive glossary (jdx#7401)
  docs: improve installation documentation (jdx#7403)
  test: add token pool integration for rate limit distribution (jdx#7397)
  docs: add link to COPR package page for Fedora/RHEL
  test: rename duplicate 'ci' job names for clarity (jdx#7398)
  registry: add github backend for swiftformat (jdx#7396)
  chore: rename mise-tools to mise-versions
  chore: release 2025.12.12 (jdx#7386)
  fix(github): use version_prefix when fetching release for SLSA verification (jdx#7391)
  refactor(vfox): remove submodules, embed plugins directly (jdx#7389)
  test(registry): add final ci job as merge gate (jdx#7390)
  test: split unit job to speed up macOS CI (jdx#7388)
  feat(backend): add security features to github backend (jdx#7387)
jdx pushed a commit that referenced this pull request Dec 19, 2025
### 🚀 Features

- **(tera)** add haiku() function for random name generation by @jdx in
[#7399](#7399)
- implement independent versioning for subcrates by @jdx in
[#7402](#7402)

### 🐛 Bug Fixes

- **(ci)** improve GHA cache efficiency and fix registry-ci bug by @jdx
in [#7404](#7404)
- **(ci)** use !cancelled() instead of always() for registry-ci by @jdx
in [#7435](#7435)
- **(test)** update backend_arg test to use clojure instead of poetry by
@jdx in [#7436](#7436)

### 📚 Documentation

- add link to COPR package page for Fedora/RHEL by @jdx in
[bc8ac73](bc8ac73)
- improve installation documentation by @jdx in
[#7403](#7403)
- add comprehensive glossary by @jdx in
[#7401](#7401)

### 🧪 Testing

- rename duplicate 'ci' job names for clarity by @jdx in
[#7398](#7398)
- add token pool integration for rate limit distribution by @jdx in
[#7397](#7397)

### 📦 Registry

- add github backend for swiftformat by @jdx in
[#7396](#7396)
- use pipx backend for azure-cli by @jdx in
[#7406](#7406)
- use pipx backend for dvc by @jdx in
[#7413](#7413)
- add github backend for zprint by @jdx in
[#7410](#7410)
- use gem backend for cocoapods by @jdx in
[#7411](#7411)
- use pipx backend for gallery-dl by @jdx in
[#7409](#7409)
- add aqua backends for HashiCorp tools by @jdx in
[#7408](#7408)
- use npm backend for danger-js by @jdx in
[#7407](#7407)
- use pipx backend for pipenv by @jdx in
[#7415](#7415)
- use pipx backend for poetry by @jdx in
[#7416](#7416)
- add github backend for xcodegen
([github:yonaskolb/XcodeGen](https://github.com/yonaskolb/XcodeGen)) by
@jdx in [#7417](#7417)
- use npm backend for heroku by @jdx in
[#7418](#7418)
- add aqua backend for setup-envtest by @jdx in
[#7421](#7421)
- add github backend for xcresultparser
([github:a7ex/xcresultparser](https://github.com/a7ex/xcresultparser))
by @jdx in [#7422](#7422)
- add aqua backend for tomcat by @jdx in
[#7423](#7423)
- use npm backend for serverless by @jdx in
[#7424](#7424)
- add github backend for daytona
([github:daytonaio/daytona](https://github.com/daytonaio/daytona)) by
@jdx in [#7412](#7412)
- add github backend for flyway
([github:flyway/flyway](https://github.com/flyway/flyway)) by @jdx in
[#7414](#7414)
- add github backend for schemacrawler
([github:schemacrawler/SchemaCrawler](https://github.com/schemacrawler/SchemaCrawler))
by @jdx in [#7419](#7419)
- add github backend for codeql by @jdx in
[#7420](#7420)
- use pipx backend for mitmproxy by @jdx in
[#7425](#7425)
- use pipx backend for sshuttle by @jdx in
[#7426](#7426)
- add github backend for quarkus by @jdx in
[#7428](#7428)
- add github backend for smithy by @jdx in
[#7430](#7430)
- add github backend for xchtmlreport
([github:XCTestHTMLReport/XCTestHTMLReport](https://github.com/XCTestHTMLReport/XCTestHTMLReport))
by @jdx in [#7431](#7431)
- add github backend for grails by @jdx in
[#7429](#7429)
- use npm backend for esy by @jdx in
[#7434](#7434)
- add github backend for micronaut by @jdx in
[#7433](#7433)
- add github backend for dome by @jdx in
[#7432](#7432)
- use vfox backend for poetry by @jdx in
[#7438](#7438)

### Chore

- **(docker)** add Node LTS to mise Docker image by @jdx in
[#7405](#7405)
- rename mise-tools to mise-versions by @jdx in
[ab3e1b8](ab3e1b8)
- s/mise task/mise tasks/g in docs and tests by @muzimuzhi in
[#7400](#7400)

### New Contributors

- @muzimuzhi made their first contribution in
[#7400](#7400)
jdx added a commit that referenced this pull request Dec 30, 2025
The independent subcrate versioning feature (#7402) had two issues:

1. No initial tags were created for existing published versions, causing
   `has_crate_changes()` to always detect changes and attempt republishing

2. The calver bump logic was complex and could produce versions that
   already exist on crates.io (e.g., bumping 2025.10.0 -> 2025.11.0 when
   2025.11.0 was already published)

This fix:
- Updates subcrate Cargo.toml versions to match crates.io (2025.12.12)
- Simplifies calver to use YYYY.MM.0 for first release of each month
- Tags vfox-v2025.12.12 and aqua-registry-v2025.12.12 were pushed separately

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jdx added a commit that referenced this pull request Dec 30, 2025
## Summary

Fixes the release-plz workflow failure caused by the independent
subcrate versioning feature (#7402).

**Root cause:**
1. No initial tags (`vfox-v*`, `aqua-registry-v*`) were created when the
feature was deployed
2. `has_crate_changes()` always detected changes since no tags existed
3. The calver bump logic bumped `2025.10.0` → `2025.11.0`, but
`2025.11.0` already existed on crates.io

**This fix:**
- Updates subcrate Cargo.toml versions to match crates.io (`2025.12.12`)
- Simplifies calver logic to use `YYYY.MM.0` for first release of each
month
- Tags `vfox-v2025.12.12` and `aqua-registry-v2025.12.12` were pushed
separately

**New versioning scheme for subcrates:**
- First release in a month: `YYYY.MM.0` (e.g., `2025.12.0`, `2026.1.0`)
- Subsequent releases in same month: `YYYY.MM.1`, `YYYY.MM.2`, etc.

## Test plan
- [x] Verify script syntax with `bash -n xtasks/release-plz`
- [ ] Verify release-plz workflow passes after merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Aligns subcrate versions with crates.io and standardizes monthly
calver behavior in the release script.
> 
> - Bumps `aqua-registry` and `vfox` to `2025.12.12` in their
`Cargo.toml` files and `Cargo.lock`
> - Updates `xtasks/release-plz` to use calver `YYYY.MM.0` on new
month/year and patch-bump within the same `YYYY.MM`, applied in both
`bump_subcrate_if_changed` and `bump_and_publish_subcrate`
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cad4356. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.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.

2 participants