Skip to content

fix(uninstall): report each version once in a dry run - #13992

Merged
jdx merged 2 commits into
mainfrom
claude/mise-discussion-13988-3a901b
Oct 6, 2026
Merged

jdx merged 2 commits into
mainfrom
claude/mise-discussion-13988-3a901b

Conversation

@jdx

@jdx jdx commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

https://entire.io/gh/jdx/mise/trails/445

Fixes the confusing output in discussion #13988: mise uninstall --dry-run java --all printed the same remove <path> row several times per version, plus a row for a version that isn't installed.

$ mise uninstall --dry-run java --all
java@temurin-11.0.30+7 remove ~/.local/share/mise/installs/java/temurin-11.0.30+7
java@temurin-11.0.30+7 remove ~/.local/share/mise/installs/java/temurin-11.0.30+7
java@temurin-27.0.0+35 remove ~/.local/share/mise/installs/java/temurin-27.0.0+35
...
java@27.0.0     remove ~/Library/Caches/mise/java/27.0.0
  • A dry run now collects the install, download and cache paths and reports them in one message per version, instead of one progress-row update per path.
  • mise uninstall --all skips a listed entry whose install directory doesn't exist (a configured request like 27 standing for temurin-27.0.0+35), so it no longer shows up as a second removal that only touches cache.

I reproduced the output on Linux without a TTY (clean there) and couldn't reproduce the repeated rows themselves, so the TTY redraw is read from the code rather than observed. The e2e test covers the one-row-per-version output.

AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: claude-code_2-1-288_agent.

🤖 Generated with Claude Code


Note

Low Risk
Uninstall and dry-run display logic only; real uninstall behavior is unchanged aside from skipping non-existent install dirs under --all.

Overview
Fixes noisy and misleading mise uninstall --dry-run output, especially with --all.

Dry-run reporting now gathers install, download, and cache paths for each version and emits a single remove … line listing every path, instead of updating the progress row once per path (which duplicated rows on a TTY).

uninstall --all skips configured versions whose install directory is missing, so alias-style entries (e.g. a short 27 vs the real temurin-… install name) no longer appear as extra removals that only touch cache.

An e2e test asserts one dry-run line per version and that both install and cache paths are named.

Reviewed by Cursor Bugbot for commit f96f3d6. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • uninstall --all now skips versions that are not actually installed, preventing stale cache data from creating misleading removal entries.
    • Dry-run output now groups the paths that would be removed into a single progress message. It shows the installation and cache paths for each version once, making planned removals easier to review.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M47E445C2X1VR3XAQ07NWQB4
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d9eb8cd0-e787-4550-91cf-b88611a33337
📥 Commits

Reviewing files that changed from the base of the PR and between 5fb85b9 and f96f3d6.

📒 Files selected for processing (1)
  • e2e/cli/test_uninstall

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The uninstall flow skips missing installation paths in --all mode. Dry-run removal collects existing paths and reports them together. An end-to-end test checks the output for two installed versions.

Changes

Uninstall dry-run handling

Layer / File(s) Summary
Filter missing candidates
src/cli/uninstall.rs
In --all mode, candidates whose installation paths do not exist are skipped and logged at debug level.
Aggregate dry-run paths and verify output
src/backend/mod.rs, e2e/cli/test_uninstall
Dry-run removal collects existing paths, including dangling links, and reports them in one message. The test checks that each of two installed dummy versions appears once and that its install and cache paths appear in the output.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f96f3

Dry-run output groups the relevant paths for each removal candidate, and --all skips candidates without an installation directory. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: report each version once during an uninstall dry run.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Changes how the uninstall command reports what it would remove.

The PR appears safe to merge; no new blocking issue was found.

What we checked:

  • Extra download path breaks test: Successful installs clean up downloads. The test runs in an isolated environment without enabling download retention.

Summary

Dry-run uninstall now reports removal paths in one message per version. --all also skips entries with no install path.

  • The latest changes strengthen the test for both versions and their install and cache paths.
  • The earlier unnumbered test-coverage thread was resolved by jdx after adding cache directories and path assertions. Download-path coverage remains outside this test; no duplicate finding is posted.
  • No new actionable issues were found.

Reviews (2) · Last reviewed commit: "test(uninstall): assert the dry run name..."

Comment thread e2e/cli/test_uninstall Outdated
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▆▄▁▄▃▃▃▂▃█▆█ 27,155,323 → 27,173,660 +0.07% 18.50 → 19.48ms +5.30%
hook-env ▃▁▃▅▅▄▃▄▅█▇▆ 29,153,349 → 29,150,352 -0.01% 19.41 → 19.98ms +2.96%
ls ▃▁▂▂▂▂▁▁▂███ 30,864,295 → 30,857,761 -0.02% 20.18 → 21.20ms +5.02%
registry █▄▁▃▃▄▄▄▄▄▄▁ 39,952,703 → 39,868,049 -0.21% 17.07 → 17.70ms +3.71%
startup █▅▁▂▂▂▁▂▁▂▃▃ 10,829,168 → 10,829,420 +0.00% 11.50 → 12.27ms +6.68%

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.

f96f3d660cbd vs 171902a41a63 · measured on the runner, not pushed to the history.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M48BRAGC5WXW51J2ZS082JS1
@jdx
jdx enabled auto-merge (squash) October 6, 2026 10:40
@jdx
jdx merged commit 3ae0a4d into main Oct 6, 2026
65 checks passed
@jdx
jdx deleted the claude/mise-discussion-13988-3a901b branch October 6, 2026 10:52
jdx pushed a commit that referenced this pull request Oct 7, 2026
<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise/trails/430
<!-- entire-trail-link-end -->

### 🚀 Features

- **(bootstrap)** add a tool-update service that keeps auto_update tools
current by @jdx in [#14040](#14040)
- **(config)** add global section write targets by @jdx in
[#14018](#14018)
- **(config)** move mise's auto-update settings under self_update.* by
@jdx in [#14038](#14038)
- **(dotfiles)** report notification availability and add notify command
by @jdx in [#14009](#14009)
- **(dotfiles)** add merge entries that own only some keys of a config
file by @jdx in [#14012](#14012)
- **(http)** add headers option for bearer and API-key auth by @jdx in
[#14022](#14022)
- **(install)** add an opt-in identity-based install layout by @jdx in
[#13951](#13951)
- **(install)** keep identity-layout installations in a shorter
directory on Windows by @jdx in
[#13952](#13952)
- **(installs)** list installations and choose the one requests without
a lockfile use by @jdx in
[#13953](#13953)
- **(installs)** move legacy installations into the identity layout by
@jdx in [#13955](#13955)
- **(lock)** preserve shared lockfile entries on request by @jdx in
[#13980](#13980)
- **(npm)** install packages from git repositories by @jdx in
[#14044](#14044)
- **(prune)** add prune.exclude to keep chosen tools from being pruned
by @jdx in [#14030](#14030)
- **(secrets)** add [secrets.fnox] project config and mise secrets ls by
@jdx in [#13967](#13967)
- **(secrets)** add --secrets and --secrets-all to mise run and mise x
by @jdx in [#13975](#13975)
- **(task)** give tasks only the fnox secrets they list by @jdx in
[#13974](#13974)
- **(task)** allow {{ secrets.X }} in task env values by @jdx in
[#13978](#13978)
- **(upgrade)** update global tools before they run with auto_update by
@jdx in [#14026](#14026)
- **(util)** add a comment-preserving YAML merge helper by @jdx in
[#14010](#14010)
- **(util)** add format-aware merge for JSON, TOML, and YAML files by
@jdx in [#14011](#14011)

### 🐛 Bug Fixes

- **(backend)** read a repository's packslip release list once per
command by @jdx in [#13991](#13991)
- **(backend)** only warn about a backend switch when the backend kind
changes by @jdx in [#14032](#14032)
- **(bootstrap)** don't create history state or fail on its lock unless
writing files by @jdx in
[#14029](#14029)
- **(cargo)** serialize rustup state across cargo install fallbacks by
@jdx in [#14042](#14042)
- **(config)** keep global config when a project ignore resolves onto it
via symlink by @jdx in [#14006](#14006)
- **(doctor)** only warn about backend mismatches the registry serves by
@jdx in [#14005](#14005)
- **(dotenv)** leave a value ending in escaped whitespace unquoted by
@jdx in [#13956](#13956)
- **(dotfiles)** explain missing sources in conflicting declaration
errors by @himkt in [#13973](#13973)
- **(dotfiles)** skip legacy link discovery for group entries by @jdx in
[#14023](#14023)
- **(dotnet)** disable lockfile url enforcement for dotnet tool backend
by @james-newell-forge in
[#13971](#13971)
- **(env)** fully redact secrets when redaction values overlap by @jdx
in [#13962](#13962)
- **(github)** log partial attestation verification failures by @jdx in
[#14035](#14035)
- **(github)** warn when attestations are skipped because the Sigstore
trust root is unreachable by @jdx in
[#14036](#14036)
- **(http)** fetch a cached GitHub release once when callers race by
@jdx in [#13990](#13990)
- **(http)** don't retry a 429 whose Retry-After outlasts the backoff by
@jdx in [#14027](#14027)
- **(http)** retry downloads when an HTTP/2 stream reset fails the body
read by @jdx in [#14049](#14049)
- **(install)** switch backends into a new installation, and resolve
CLI-named versions without guessing by @jdx in
[#13957](#13957)
- **(install)** keep a version incomplete until its postinstall hook
succeeds by @jdx in [#14037](#14037)
- **(install)** keep incomplete-install markers out of the cache by @jdx
in [#14051](#14051)
- **(mcp)** reject run_task task names that start with a dash by @jdx in
[#13961](#13961)
- **(oci)** stream large blob uploads in one PATCH by @jdx in
[#14017](#14017)
- **(outdated)** don't bump vendor-only requests like java@temurin by
@jdx in [#14031](#14031)
- **(prune)** keep versions that a running process was started from by
@jdx in [#14020](#14020)
- **(prune)** snapshot what templated tool versions render to in the
identity layout by @jdx in
[#14025](#14025)
- **(pypi)** build uv tool venvs on mise's python by @jdx in
[#14024](#14024)
- **(pypi)** lock from <root>/simple/ for JSON URLs by @deiga in
[#14007](#14007)
- **(python)** create the auto uv venv with mise's python during install
by @halms in [#13981](#13981)
- **(release)** skip the vfox-tiny test fixture when vendoring embedded
plugins by @jdx in [#14047](#14047)
- **(ruby)** keep Gemfile reload watches out of executable hooks by
@DahanItamar in [#13985](#13985)
- **(task)** list monorepo subproject tasks in the mise://tasks MCP
resource by @jdx in [#14053](#14053)
- **(uninstall)** report each version once in a dry run by @jdx in
[#13992](#13992)

### 📚 Documentation

- **(http)** show a package proxy recipe for url_replacements by @jdx in
[#14050](#14050)
- **(readme)** add Star History badges by @jdx in
[#13968](#13968)
- keep code blocks and alert markers out of llms.txt summaries by
@DahanItamar in [#14034](#14034)

### ⚡ Performance

- **(secrets)** read cached fnox secrets from the fnox daemon by @jdx in
[#13979](#13979)

### 🧪 Testing

- **(e2e)** stabilize task timing assertions by @jdx in
[#13977](#13977)
- **(go)** disable minimum_release_age in go install e2e by @jdx in
[#13989](#13989)

### 📦️ Dependency Updates

- lock file maintenance by @renovate[bot] in
[#13963](#13963)
- update github actions by @renovate[bot] in
[#13994](#13994)
- update rust crates by @renovate[bot] in
[#13996](#13996)
- update rust crate nodejs-semver to v7 by @renovate[bot] in
[#13999](#13999)
- update jdx/mise-action action to v5 by @renovate[bot] in
[#13997](#13997)
- update jdx/renovate-config action to v1.0.2 by @renovate[bot] in
[#14003](#14003)
- update dependency usage to latest by @renovate[bot] in
[#14004](#14004)
- update jdx crates to v6.12.1 by @renovate[bot] in
[#14002](#14002)
- update rust crate sigstore-verify to 0.14 by @jdx in
[#14019](#14019)
- update rattler by @renovate[bot] in
[#13998](#13998)
- update rust crate clx to v3.0.4 by @renovate[bot] in
[#14028](#14028)

### 📦 Registry

- update moved plugin references by @jdx in
[#13972](#13972)

### Chore

- **(ci)** update pr-closer to v1.3.0 by @jdx in
[83f3e90](83f3e90)

### Ci

- update pr closer action by @jdx in
[#13970](#13970)
- add manual M4 sandbox pilot by @jdx in
[09e8f8f](09e8f8f)

### Security

- **(env)** keep secrets inherited from a parent mise out of templates,
caches and other tasks by @jdx in
[#13966](#13966)

### New Contributors

- @DahanItamar made their first contribution in
[#14034](#14034)
- @deiga made their first contribution in
[#14007](#14007)
- @james-newell-forge made their first contribution in
[#13971](#13971)

## 📦 Aqua Registry Updates

### New Packages (3)

-
[`editorconfig/editorconfig-core-go`](https://github.com/editorconfig/editorconfig-core-go)
- [`jdx/jactionlint`](https://github.com/jdx/jactionlint)
- [`tontinton/maki`](https://github.com/tontinton/maki)

### Updated Packages (3)

- [`anchore/syft`](https://github.com/anchore/syft)
- [`eksctl-io/eksctl`](https://github.com/eksctl-io/eksctl)
-
[`regclient/regclient/regsync`](https://github.com/regclient/regclient)
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.

1 participant