fix(self-update): self-update fails across year boundary due to semver mismatch#7611
Merged
fix(self-update): self-update fails across year boundary due to semver mismatch#7611
Conversation
When updating from 2025.x to 2026.x, self-update would fail with "No asset found" because: 1. Mise constructs target filename with latest version (v2026.1.1) 2. But without --force, it doesn't set target_version_tag 3. The self_update library then uses semver compatibility to find v2025.12.13 as the "compatible" release 4. It tries to find mise-v2026.1.1-*.tar.gz in v2025.12.13's assets 5. Fails because those assets don't exist in that release Fix: Always set target_version_tag to match the version baked into the target filename, ensuring the library fetches the correct release. Fixes: #7589 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a critical bug where mise self-update fails across calendar year boundaries (e.g., 2025.x to 2026.x) due to a semver compatibility mismatch in the self_update crate. The root cause was that the target version tag wasn't being set consistently, allowing the library to select a "compatible" but incorrect version for asset lookup.
- Removes conditional logic that prevented setting
target_version_tagin non-force updates - Ensures version consistency between the constructed target filename and the release lookup
- Prevents the self_update crate from using semver compatibility to select wrong release versions
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.1.1 x -- echo |
21.1 ± 0.3 | 20.5 | 23.9 | 1.00 |
mise x -- echo |
21.7 ± 0.7 | 20.5 | 27.9 | 1.03 ± 0.03 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.1.1 env |
20.2 ± 0.4 | 19.3 | 23.7 | 1.00 |
mise env |
20.3 ± 0.4 | 19.4 | 21.4 | 1.01 ± 0.03 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.1.1 hook-env |
20.1 ± 0.3 | 19.4 | 21.6 | 1.00 |
mise hook-env |
20.8 ± 0.4 | 19.9 | 22.2 | 1.04 ± 0.03 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.1.1 ls |
18.0 ± 0.3 | 17.4 | 19.4 | 1.00 |
mise ls |
18.7 ± 0.5 | 17.7 | 22.3 | 1.04 ± 0.03 |
xtasks/test/perf
| Command | mise-2026.1.1 | mise | Variance |
|---|---|---|---|
| install (cached) | 112ms | 113ms | +0% |
| ls (cached) | 68ms | 69ms | -1% |
| bin-paths (cached) | 73ms | 73ms | +0% |
| task-ls (cached) | 285ms | 293ms | -2% |
jdx
pushed a commit
that referenced
this pull request
Jan 13, 2026
### 🐛 Bug Fixes - **(backend)** filter pre-release versions with latest + install_before by @koh-sh in [#7631](#7631) - **(docs)** formatting in configuration hierarchy section by @jonathanagustin in [#7638](#7638) - **(npm)** migrate npm publish to OIDC trusted publishing by @jdx in [#7607](#7607) - **(registry)** correct checkmake version test pattern by @jdx in [#7632](#7632) - **(release)** handle empty grep result in aqua-registry changelog by @jdx in [f45b4c6](f45b4c6) - **(self-update)** self-update fails across year boundary due to semver mismatch by @jdx in [#7611](#7611) - **(tasks)** fix tool inheritance from intermediate parents by @chadxz in [#7637](#7637) - add `-test` to VERSION_REGEX prerelease filter by @belgio99 in [#7647](#7647) ### 📚 Documentation - **(tasks)** remove documentation for unimplemented features by @turbocrime in [#7599](#7599) - update `mise aliases` references to `mise tool-alias` by @muzimuzhi in [#7615](#7615) - use call operator in PowerShell profile example by @shina1024 in [#7639](#7639) - replace ASCII .pub key with binary .gpg for signed-by on Ubuntu/Debian by @gmalinowski in [#7649](#7649) ### 🛡️ Security - **(security)** prevent code execution from untrusted fork in registry-comment workflow by @jdx in [4a2441e](4a2441e) ###◀️ Revert - Revert "fix(release): handle empty grep result in aqua-registry changelog" by @jdx in [522ffdc](522ffdc) - Revert "chore(release): include manually updated aqua-registry entries in the changelog " by @jdx in [1ebb943](1ebb943) ### 📦️ Dependency Updates - update ghcr.io/jdx/mise:alpine docker digest to fbfffcf by @renovate[bot] in [#7619](#7619) - lock file maintenance by @renovate[bot] in [#7646](#7646) ### 📦 Registry - add hatoo/oha tool by @jylenhof in [#7633](#7633) ### Chore - **(registry)** fix registry comment workflow by @risu729 in [#7554](#7554) - **(release)** include manually updated aqua-registry entries in the changelog by @risu729 in [#7603](#7603) ### New Contributors - @belgio99 made their first contribution in [#7647](#7647) - @gmalinowski made their first contribution in [#7649](#7649) - @chadxz made their first contribution in [#7637](#7637) - @shina1024 made their first contribution in [#7639](#7639) - @jonathanagustin made their first contribution in [#7638](#7638) - @turbocrime made their first contribution in [#7599](#7599) ## 📦 Aqua Registry Updates #### New Packages (3) - [`ampcode/zvelte-check`](https://github.com/ampcode/zvelte-check) - [`nickel-lang/nickel`](https://github.com/nickel-lang/nickel) - [`openshift/rosa`](https://github.com/openshift/rosa)
jdx
added a commit
that referenced
this pull request
Jan 14, 2026
PR #7611 fixed the year boundary semver issue by always setting target_version_tag, but this broke the "already up to date" detection since the self_update library no longer performs its own version check. This adds an explicit version comparison before calling update(), returning Status::UpToDate when versions match (unless --force is set). Also wraps the blocking HTTP calls in tokio::task::block_in_place() to fix a panic in debug builds where reqwest::blocking tries to create a nested tokio runtime. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 tasks
jdx
added a commit
that referenced
this pull request
Jan 14, 2026
## Summary - Fixes regression from #7611 where `mise self-update` would download and update even when already at the latest version - Adds explicit version comparison before calling `update()`, returning `Status::UpToDate` when versions match (unless `--force` is set) - Wraps blocking HTTP calls in `tokio::task::block_in_place()` to fix panic in debug builds ## Root Cause PR #7611 fixed the year boundary semver issue by always setting `target_version_tag`, but this bypassed the self_update library's own "already up to date" detection. The library no longer checks if an update is needed when a specific target version is set. ## Test plan - [x] `mise self-update` reports "mise is already up to date" when current version matches latest - [x] `mise self-update --force` still downloads and updates - [x] Debug builds no longer panic due to nested tokio runtime Fixes: #7589 🤖 Generated with [Claude Code](https://claude.ai/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Prevents unnecessary self-updates and fixes async runtime issues. > > - Adds version comparison before update; returns `Status::UpToDate` when current `v{cargo_crate_version!()}` matches latest (unless `--force`) > - Wraps blocking HTTP in `tokio::task::block_in_place()` via `do_update` -> `do_update_blocking` split > - Always sets `update.target_version_tag(&v)` to ensure correct release selection across semver/year boundaries > - Keeps plugin auto-update behavior; no-confirm still respects settings and `--yes` > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8ca7d9c. 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
target_version_tagto match the version in the target filenameRoot Cause
When updating from v2025.12.12:
get_latest_release()which returns v2026.1.1mise-v2026.1.1-macos-arm64.tar.gz--force, doesn't settarget_version_tagmise-v2026.1.1-*.tar.gzin v2025.12.13's assetsmise-v2025.12.13-*.tar.gzassetsTest plan
mise self-updateFixes: #7589
🤖 Generated with Claude Code
Note
Ensures the self-update process downloads assets for the exact intended release by always pinning the target version tag.
update.target_version_tag(&v)insrc/cli/self_update.rsso the release lookup matches the version embedded in the constructed asset filenameself_updateselects a semver-compatible release different fromvwhile the asset name is built withvWritten by Cursor Bugbot for commit 68444d3. This will update automatically on new commits. Configure here.