Skip to content

fix(install): improve error when registry tool has no supported backends#8388

Merged
jdx merged 4 commits intomainfrom
fix/registry-backend-error-message
Feb 28, 2026
Merged

fix(install): improve error when registry tool has no supported backends#8388
jdx merged 4 commits intomainfrom
fix/registry-backend-error-message

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Feb 28, 2026

Summary

  • When a tool exists in the registry but all its backends are filtered out for the current platform (e.g. imagemagick on Windows where asdf is disabled), the error now explains that the tool is in the registry but its backends aren't supported, listing the registered backends
  • Fix "Did you mean?" suggestions suggesting the exact tool name the user already typed (circular suggestion bug)

Before:

mise ERROR imagemagick not found in mise tool registry

Did you mean?
  imagemagick
  aqua:genuinetools/img

After:

mise ERROR imagemagick is in the mise tool registry but none of its backends (conda:imagemagick, asdf:mise-plugins/mise-imagemagick) are supported on this platform

Closes #8386

Test plan

  • cargo check passes
  • Lints pass

🤖 Generated with Claude Code


Note

Low Risk
Changes are limited to CLI error handling and suggestion generation when backend resolution fails; successful install/resolve paths are unaffected, with minimal behavioral risk.

Overview
Improves BackendArg::backend() failure reporting when a tool exists in the registry but all of its backends are filtered out by the current configuration/platform, returning a clearer error that lists the tool’s registered backends.

Also fixes the "Did you mean?" output to avoid suggesting the exact same tool name the user already entered.

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

When a tool exists in the registry but all its backends are filtered out
(e.g. imagemagick on Windows where asdf is disabled), the error message
said "not found in mise tool registry" which is misleading. Now it
explains that the tool is in the registry but its backends aren't
supported on the current platform, listing the registered backends.

Also fix "Did you mean?" suggestions suggesting the exact tool name the
user already typed.

Closes #8386

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the user experience for mise CLI tool installations by improving error messages and suggestion logic. It specifically addresses cases where a requested tool is registered but lacks platform-compatible backends, and rectifies a bug in the "Did you mean?" feature that previously offered redundant suggestions.

Highlights

  • Error Handling: Enhanced the error message displayed when a tool exists in the registry but has no backends supported on the current platform, providing a clearer explanation and listing the unsupported backends.
  • Suggestion Logic: Resolved an issue where the 'Did you mean?' suggestions would incorrectly include the exact tool name the user had already typed, preventing circular suggestions.
Changelog
  • src/cli/args/backend_arg.rs
    • Added logic to check if a tool is in the registry but has no supported backends for the current platform, and if so, generates a specific error message listing all registered backends.
    • Modified the suggestion generation to filter out the exact tool name the user entered, preventing self-referential 'Did you mean?' suggestions.
Activity
  • The author has confirmed that cargo check passes.
  • The author has confirmed that lints pass.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces two nice improvements. First, it enhances the error message for tools that are in the registry but have no supported backends on the current platform, which will be very helpful for users. Second, it fixes a bug in the 'Did you mean?' suggestions to prevent suggesting the exact tool name the user already entered. The changes are well-implemented. I have one minor suggestion to improve performance slightly by avoiding an intermediate collection when building the error message string.

Comment on lines +181 to +185
let all_backends: Vec<&str> = rt.backends.iter().map(|rb| rb.full).collect();
bail!(
"{self} is in the mise tool registry but none of its backends ({}) are supported on this platform",
all_backends.join(", ")
);
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve performance and code clarity, you can use itertools::Itertools::join to avoid the intermediate Vec allocation. This requires adding use itertools::Itertools; to the file's imports.

Suggested change
let all_backends: Vec<&str> = rt.backends.iter().map(|rb| rb.full).collect();
bail!(
"{self} is in the mise tool registry but none of its backends ({}) are supported on this platform",
all_backends.join(", ")
);
let all_backends = rt.backends.iter().map(|rb| rb.full).join(", ");
bail!(
"{self} is in the mise tool registry but none of its backends ({}) are supported on this platform",
all_backends
);

…in error

Backends can be filtered out for reasons beyond just platform (e.g.
disable_backends settings), so the error message now says "current
configuration" to be accurate in all cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@greptile-apps
Copy link

greptile-apps bot commented Feb 28, 2026

Greptile Summary

Improved error messages when registry tools have no supported backends on the current platform, and fixed the circular suggestion bug where "Did you mean?" would suggest the exact tool name the user already typed.

Key improvements:

  • Added check to detect when a tool exists in the registry but all its backends are filtered out (e.g., platform-specific filtering)
  • Enhanced error message now lists all registered backends and explains they're not supported on the current platform
  • Fixed suggestion algorithm to exclude exact matches, preventing circular suggestions

The implementation correctly distinguishes between rt.backends (all defined backends) and rt.backends() (platform-filtered backends available on the current system). The logic properly handles the edge case where backends exist but none are compatible with the current platform configuration.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward error message improvements with clear logic: adding a platform-backend check and filtering out circular suggestions. The implementation correctly uses the existing registry API (backends() method vs backends field) and the filter logic is sound. No changes to core functionality, just better user-facing error messages.
  • No files require special attention

Important Files Changed

Filename Overview
src/cli/args/backend_arg.rs Enhanced error messaging for registry tools with platform-filtered backends and fixed circular suggestion bug

Last reviewed commit: 1aef546

@jdx
Copy link
Owner Author

jdx commented Feb 28, 2026

bugbot run

Copy link

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@jdx jdx enabled auto-merge (squash) February 28, 2026 12:04
@jdx jdx merged commit a8799f8 into main Feb 28, 2026
34 of 35 checks passed
@jdx jdx deleted the fix/registry-backend-error-message branch February 28, 2026 12:09
@github-actions
Copy link

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.23 x -- echo 27.2 ± 0.5 25.7 33.0 1.00
mise x -- echo 31.3 ± 0.9 29.8 39.5 1.15 ± 0.04
⚠️ Warning: Performance variance for x -- echo is 15%

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.23 env 27.0 ± 2.1 25.3 56.2 1.00
mise env 30.4 ± 0.5 29.3 33.7 1.12 ± 0.09
⚠️ Warning: Performance variance for env is 12%

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.23 hook-env 27.4 ± 0.4 26.0 28.9 1.00
mise hook-env 31.5 ± 0.6 30.5 40.6 1.15 ± 0.03
⚠️ Warning: Performance variance for hook-env is 15%

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.23 ls 24.9 ± 0.5 23.9 30.7 1.00
mise ls 25.2 ± 0.4 23.7 28.6 1.01 ± 0.03

xtasks/test/perf

Command mise-2026.2.23 mise Variance
install (cached) 162ms 166ms -2%
ls (cached) 91ms 91ms +0%
bin-paths (cached) 96ms 100ms -4%
task-ls (cached) 875ms 864ms +1%

mise-en-dev added a commit that referenced this pull request Mar 1, 2026
### 🐛 Bug Fixes

- **(aqua)** remove unnecessary bin_paths disk cache by @jdx in
[#8383](#8383)
- **(hooks)** render tera templates and fix output masking by @jdx in
[#8385](#8385)
- **(install)** improve error when registry tool has no supported
backends by @jdx in [#8388](#8388)
- **(python)** remove deprecated venv_auto_create setting by @jdx in
[#8384](#8384)
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