fix: default legacy .mise.backend installs to non-explicit#8245
Conversation
Legacy `.mise.backend` files (2-line format without an explicit_backend flag) were defaulting to `explicit_backend = true` because `is_none_or()` returns true when the third line is absent. This prevented auto-migration to updated registry backends. For example, `glab` was stuck on the deprecated `ubi` backend (which hits api.github.com and 404s) instead of migrating to the correct `gitlab:gitlab-org/cli` backend from the registry. Change from `is_none_or` to `is_some_and` so legacy installs default to `explicit_backend = false`, allowing the auto-migration logic in `BackendArg::full()` to resolve them to current registry backends. Fixes jdx#8244
Summary of ChangesHello @jean-humann, 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 addresses a critical issue preventing legacy 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 correctly fixes a bug in parsing legacy .mise.backend files. Previously, these files defaulted to explicit_backend = true, which prevented auto-migration to updated registry backends. The change from is_none_or to is_some_and ensures that legacy 2-line format files correctly default to explicit_backend = false, enabling the migration logic. The fix is concise, correct, and well-explained in the pull request description. No further changes are needed.
### 🐛 Bug Fixes - **(install)** use backend bin paths for per-tool postinstall hooks by @jdx in [#8234](#8234) - **(use)** write to config.toml instead of config.local.toml by @jdx in [#8240](#8240) - default legacy .mise.backend installs to non-explicit by @jean-humann in [#8245](#8245) ### 🚜 Refactor - **(config)** consolidate flat task_* settings into nested task.* by @jdx in [#8239](#8239)
## [2026.2.18](https://github.com/jdx/mise/compare/v2026.2.17..v2026.2.18) - 2026-02-21 ### 🚀 Features - **(install)** auto-lock all platforms after tool installation by @jdx in [#8277](jdx/mise#8277) ### 🐛 Bug Fixes - **(config)** respect --yes flag for config trust prompts by @jdx in [#8288](jdx/mise#8288) - **(exec)** strip shims from PATH on Unix to prevent infinite recursion by @jdx in [#8276](jdx/mise#8276) - **(install)** validate --locked before --dry-run short-circuit by @altendky in [#8290](jdx/mise#8290) - **(release)** refresh PATH after mise up in release-plz by @jdx in [#8292](jdx/mise#8292) - **(schema)** replace unevaluatedProperties with additionalProperties by @jdx in [#8285](jdx/mise#8285) - **(task)** avoid duplicated stderr on task failure in replacing mode by @jdx in [#8275](jdx/mise#8275) - **(task)** use process groups to kill child process trees on Unix by @jdx in [#8279](jdx/mise#8279) - **(task)** run depends_post tasks even when parent task fails by @jdx in [#8274](jdx/mise#8274) - **(task)** suggest similar commands when mistyping a CLI subcommand by @jdx in [#8286](jdx/mise#8286) - **(task)** execute monorepo subdirectory prepare steps from root by @jdx in [#8291](jdx/mise#8291) - **(upgrade)** don't force-reinstall already installed versions by @jdx in [#8282](jdx/mise#8282) - **(watch)** restore terminal state after watchexec exits by @jdx in [#8273](jdx/mise#8273) ### 📚 Documentation - clarify that MISE_CEILING_PATHS excludes the ceiling directory itself by @jdx in [#8283](jdx/mise#8283) ### Chore - replace gen-release-notes script with communique by @jdx in [#8289](jdx/mise#8289) ### New Contributors - @altendky made their first contribution in [#8290](jdx/mise#8290) ### 📦 Aqua Registry Updates #### New Packages (4) - [`Skarlso/crd-to-sample-yaml`](https://github.com/Skarlso/crd-to-sample-yaml) - [`kunobi-ninja/kunobi-releases`](https://github.com/kunobi-ninja/kunobi-releases) - [`swanysimon/markdownlint-rs`](https://github.com/swanysimon/markdownlint-rs) - [`tmux/tmux-builds`](https://github.com/tmux/tmux-builds) #### Updated Packages (2) - [`firecow/gitlab-ci-local`](https://github.com/firecow/gitlab-ci-local) - [`k1LoW/runn`](https://github.com/k1LoW/runn) ## [2026.2.17](https://github.com/jdx/mise/compare/v2026.2.16..v2026.2.17) - 2026-02-19 ### 🚀 Features - **(prepare)** update mtime of outputs after command is run by @halms in [#8243](jdx/mise#8243) ### 🐛 Bug Fixes - **(install)** use backend bin paths for per-tool postinstall hooks by @jdx in [#8234](jdx/mise#8234) - **(use)** write to config.toml instead of config.local.toml by @jdx in [#8240](jdx/mise#8240) - default legacy .mise.backend installs to non-explicit by @jean-humann in [#8245](jdx/mise#8245) ### 🚜 Refactor - **(config)** consolidate flat task_* settings into nested task.* by @jdx in [#8239](jdx/mise#8239) ### Chore - **(prepare)** refactor common code into ProviderBase by @halms in [#8246](jdx/mise#8246) ### 📦 Aqua Registry Updates #### Updated Packages (1) - [`namespacelabs/foundation/nsc`](https://github.com/namespacelabs/foundation/nsc)
## Summary - Fix legacy `.mise.backend` files (2-line format) defaulting to `explicit_backend = true`, which prevents auto-migration to updated registry backends ## Problem `mise install glab@1.85.3` fails with: ``` mise WARN deprecated [ubi]: The ubi backend is deprecated mise ERROR Failed to install gitlab:gitlab-org/cli@1.85.3: HTTP request to https://api.github.com/repos/gitlab-org/cli/releases/tags/1.85.3 returned an error status ``` The registry correctly maps `glab` → `gitlab:gitlab-org/cli`, but the auto-migration logic in `BackendArg::full()` is blocked because legacy installs are marked as `explicit_backend = true`. ## Root Cause In `src/toolset/install_state.rs`, `read_legacy_backend_meta()` parses the old 2-line `.mise.backend` format: ``` glab ubi:gitlab-org/cli[provider=gitlab,exe=glab] ``` Line 130 defaults missing third line to explicit: ```rust let explicit_backend = lines.get(2).is_none_or(|v| *v == "1"); // ^^^^^^^^^^^ None → true ``` This prevents the registry-based backend resolution in `BackendArg::full()` from running for any legacy install. ## Fix Change `is_none_or` → `is_some_and` so legacy installs (which were always resolved from the registry, never explicitly chosen) default to `explicit_backend = false`: ```rust let explicit_backend = lines.get(2).is_some_and(|v| *v == "1"); ``` This allows the auto-migration logic to resolve them to current registry backends. ## Test plan - [ ] Verify `mise install glab@1.85.3` resolves to `gitlab:gitlab-org/cli` and installs from `gitlab.com` - [ ] Verify explicitly installed backends (3-line format with `1`) still respect the explicit flag - [ ] Verify tools without legacy `.mise.backend` files are unaffected Fixes jdx#8244
### 🐛 Bug Fixes - **(install)** use backend bin paths for per-tool postinstall hooks by @jdx in [jdx#8234](jdx#8234) - **(use)** write to config.toml instead of config.local.toml by @jdx in [jdx#8240](jdx#8240) - default legacy .mise.backend installs to non-explicit by @jean-humann in [jdx#8245](jdx#8245) ### 🚜 Refactor - **(config)** consolidate flat task_* settings into nested task.* by @jdx in [jdx#8239](jdx#8239)
Summary
.mise.backendfiles (2-line format) defaulting toexplicit_backend = true, which prevents auto-migration to updated registry backendsProblem
mise install glab@1.85.3fails with:The registry correctly maps
glab→gitlab:gitlab-org/cli, but the auto-migration logic inBackendArg::full()is blocked because legacy installs are marked asexplicit_backend = true.Root Cause
In
src/toolset/install_state.rs,read_legacy_backend_meta()parses the old 2-line.mise.backendformat:Line 130 defaults missing third line to explicit:
This prevents the registry-based backend resolution in
BackendArg::full()from running for any legacy install.Fix
Change
is_none_or→is_some_andso legacy installs (which were always resolved from the registry, never explicitly chosen) default toexplicit_backend = false:This allows the auto-migration logic to resolve them to current registry backends.
Test plan
mise install glab@1.85.3resolves togitlab:gitlab-org/cliand installs fromgitlab.com1) still respect the explicit flag.mise.backendfiles are unaffectedFixes #8244