fix(install): improve error when registry tool has no supported backends#8388
fix(install): improve error when registry tool has no supported backends#8388
Conversation
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>
Summary of ChangesHello, 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 Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
src/cli/args/backend_arg.rs
Outdated
| 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(", ") | ||
| ); |
There was a problem hiding this comment.
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.
| 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 SummaryImproved 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:
The implementation correctly distinguishes between Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 1aef546 |
|
bugbot run |
Hyperfine Performance
|
| 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 |
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 |
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 |
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% |
### 🐛 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)
Summary
imagemagickon 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 backendsBefore:
After:
Closes #8386
Test plan
cargo checkpasses🤖 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.