Skip to content

fix(progress): add start_operations to core plugins#7351

Merged
jdx merged 2 commits into
mainfrom
fix/start-operations-core-plugins
Dec 17, 2025
Merged

fix(progress): add start_operations to core plugins#7351
jdx merged 2 commits into
mainfrom
fix/start-operations-core-plugins

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Dec 17, 2025

Summary

  • Add start_operations(3) to Go, Deno, Bun, Zig, and Elixir backends
  • Enables accurate progress bar chunking during tool installation
  • Each backend declares 3 operations: download, checksum, extract

Test plan

  • mise install go@latest shows progress in 3 phases
  • mise install deno@latest shows progress in 3 phases
  • MISE_PROGRESS_TRACE=1 mise install bun@latest logs operation transitions

🤖 Generated with Claude Code


Note

Adds 3-phase progress reporting to Bun, Deno, Go, Zig, and Elixir installs; cleans up unused imports and minor refactors.

  • Progress reporting:
    • Core plugins bun, deno, go, zig, elixir: call ctx.pr.start_operations(3) to chunk installs into download/checksum/extract phases.
  • Code cleanup:
    • Remove unused cmd and related imports across CLI, env, file, git, and UI modules; minor import adjustments in self_update and others.

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

Add start_operations() calls to Go, Deno, Bun, Zig, and Elixir backends
to enable accurate progress bar chunking during tool installation.

Each backend now declares 3 operations (download, checksum, extract).

🤖 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 17, 2025 16:13
Copy link
Copy Markdown
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 adds progress tracking initialization to five core plugin backends (Go, Deno, Bun, Zig, and Elixir) by calling start_operations(3) at the beginning of their install methods. This enables the progress bar to accurately display three distinct phases: download, checksum verification, and extraction.

Key Changes:

  • Added ctx.pr.start_operations(3) call to initialize progress tracking
  • Applied consistently across all five backends before their download step
  • Maintains existing three-phase installation flow

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/plugins/core/zig.rs Added progress tracking initialization to Zig backend install method
src/plugins/core/go.rs Added progress tracking initialization to Go backend install method
src/plugins/core/elixir.rs Added progress tracking initialization to Elixir backend install method
src/plugins/core/deno.rs Added progress tracking initialization to Deno backend install method
src/plugins/core/bun.rs Added progress tracking initialization to Bun backend install method

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

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Bug: Mismatch between declared and actual progress operations

The PR description states each backend declares 3 operations: download, checksum, and extract. However, for Bun, Deno, and Elixir plugins, the install function calls file::unzip(..., &Default::default()) which does not pass a progress reporter. This means the extraction step never calls set_length() and isn't tracked as an operation. Only 2 operations actually register (download and checksum), but start_operations(3) is called. This causes the progress bar to jump from ~66% to 100% when finishing, rather than showing incremental progress for extraction. The Zig plugin correctly passes Some(ctx.pr.as_ref()) to file::untar, while Go has the same issue on Windows.

src/plugins/core/bun.rs#L155-L160

) -> Result<ToolVersion> {
ctx.pr.start_operations(3);
let tarball_path = self.download(&tv, ctx.pr.as_ref()).await?;
self.verify_checksum(ctx, &mut tv, &tarball_path)?;
self.install(ctx, &tv, &tarball_path)?;
self.verify(ctx, &tv)?;

src/plugins/core/deno.rs#L126-L131

) -> Result<ToolVersion> {
ctx.pr.start_operations(3);
let tarball_path = self.download(&tv, ctx.pr.as_ref()).await?;
self.verify_checksum(ctx, &mut tv, &tarball_path)?;
self.install(&tv, ctx.pr.as_ref(), &tarball_path)?;
self.verify(&tv, ctx.pr.as_ref())?;

src/plugins/core/elixir.rs#L144-L149

) -> Result<ToolVersion> {
ctx.pr.start_operations(3);
let tarball_path = self.download(&tv, ctx.pr.as_ref()).await?;
self.verify_checksum(ctx, &mut tv, &tarball_path)?;
self.install(ctx, &tv, &tarball_path).await?;
self.verify(ctx, &tv).await?;

Fix in Cursor Fix in Web


@jdx
Copy link
Copy Markdown
Owner Author

jdx commented Dec 17, 2025

bugbot run

@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.10 x -- echo 19.9 ± 0.8 19.0 28.4 1.00
mise x -- echo 20.3 ± 0.9 19.3 32.9 1.02 ± 0.06

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.10 env 19.6 ± 0.7 18.4 21.5 1.00
mise env 19.7 ± 0.5 18.6 22.0 1.01 ± 0.05

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.10 hook-env 19.5 ± 0.3 18.8 21.2 1.00
mise hook-env 19.9 ± 0.4 18.9 21.4 1.02 ± 0.03

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.10 ls 17.1 ± 0.4 16.2 18.6 1.00
mise ls 17.2 ± 0.3 16.5 18.5 1.01 ± 0.03

xtasks/test/perf

Command mise-2025.12.10 mise Variance
install (cached) 108ms 111ms -2%
ls (cached) 66ms 67ms -1%
bin-paths (cached) 72ms 72ms +0%
task-ls (cached) 2258ms ✅ 277ms +715%

✅ Performance improvement: task-ls cached is 715%

Comment thread src/plugins/core/bun.rs
ctx: &InstallContext,
mut tv: ToolVersion,
) -> Result<ToolVersion> {
ctx.pr.start_operations(3);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Incorrect operation count for plugins using unzip extraction

These plugins call start_operations(3) but only 2 operations actually trigger progress tracking via set_length. The download and verify_checksum methods call set_length, but the install method uses file::unzip which doesn't support progress reporting (the function has a "TODO: show progress" comment). In contrast, Go and Zig correctly use file::untar with a progress reporter for their extract step. This mismatch causes the progress bar to appear stuck at approximately 66% during extraction before jumping to 100% at completion, since the third operation slot is never filled.

Additional Locations (2)

Fix in Cursor Fix in Web

@jdx jdx merged commit c1c025b into main Dec 17, 2025
28 checks passed
@jdx jdx deleted the fix/start-operations-core-plugins branch December 17, 2025 16:43
jdx pushed a commit that referenced this pull request Dec 18, 2025
### 🚀 Features

- **(alias)** rename alias to tool-alias, add shell-alias command by
@jdx in [#7357](#7357)
- **(upgrade)** display summary of upgraded tools by @jdx in
[#7372](#7372)
- **(vfox)** embed vfox plugin Lua code in binary by @jdx in
[#7369](#7369)

### 🐛 Bug Fixes

- **(aqua)** add start_operations for progress reporting by @jdx in
[#7354](#7354)
- **(github)** improve asset detection for distro-specific and Swift
artifacts by @jdx in [#7347](#7347)
- **(github)** clean up static_helpers.rs and fix archive bin= option by
@jdx in [#7366](#7366)
- **(http)** add start_operations for progress reporting by @jdx in
[#7355](#7355)
- **(lockfile)** place lockfile alongside config file by @jdx in
[#7360](#7360)
- **(progress)** add start_operations to core plugins by @jdx in
[#7351](#7351)
- **(ruby-install)** Use ruby_install_bin to update by @calebhearth in
[#7350](#7350)
- **(rust)** add release_url for rust versions by @jdx in
[#7373](#7373)
- **(schema)** add `tool_alias`, mark `alias` as deprecated by @SKalt in
[#7358](#7358)
- **(toolset)** filter tools by OS in list_current_versions by @jdx in
[#7356](#7356)
- **(ubi)** only show deprecation warning during installation by @jdx in
[#7380](#7380)
- **(ui)** remove noisy "record size" message during install by @jdx in
[#7381](#7381)
- update mise-versions URL to use /tools/ prefix by @jdx in
[#7378](#7378)

### 🚜 Refactor

- **(backend)** unified AssetMatcher with checksum fetching by @jdx in
[#7370](#7370)
- **(backend)** deprecate ubi backend in favor of github by @jdx in
[#7374](#7374)
- **(toolset)** decompose mod.rs into smaller modules by @jdx in
[#7371](#7371)

### 🧪 Testing

- **(e2e)** fix and rename ubi and vfox_embedded_override tests by @jdx
in
[052ea40](052ea40)

### 📦 Registry

- add vfox-gcloud backend for gcloud by @jdx in
[#7349](#7349)
- convert amplify to use github backend by @jdx in
[#7365](#7365)
- add github backend for djinni tool by @jdx in
[#7363](#7363)
- switch glab to native gitlab backend by @jdx in
[#7364](#7364)
- add s5cmd by @jdx in [#7376](#7376)

### Chore

- **(registry)** disable flaky tests for gitu and ktlint by @jdx in
[64151cb](64151cb)
- resolve clippy warnings and add stricter CI check by @jdx in
[#7367](#7367)
- suppress dead_code warnings in asset_matcher module by @jdx in
[#7377](#7377)

### New Contributors

- @calebhearth made their first contribution in
[#7350](#7350)
jekis913 added a commit to jekis913/mise that referenced this pull request Dec 18, 2025
* upstream/main:
  fix(lockfile): place lockfile alongside config file (jdx#7360)
  feat(alias): rename alias to tool-alias, add shell-alias command (jdx#7357)
  fix(aqua): add start_operations for progress reporting (jdx#7354)
  fix(schema): add `tool_alias`, mark `alias` as deprecated (jdx#7358)
  fix(progress): add start_operations to core plugins (jdx#7351)
  fix(toolset): filter tools by OS in list_current_versions (jdx#7356)
  registry: add vfox-gcloud backend for gcloud (jdx#7349)
  fix(github): improve asset detection for distro-specific and Swift artifacts (jdx#7347)
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