fix: store tool options for all backends in metadata#6807
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR inverts the logic for writing backend metadata options. Previously, only specific backend prefixes (cargo:, go:, pipx:, ubi:) would persist their tool options in the .mise.backend file, while all other backends would not. Now, all backends except core: will persist their options.
Key Changes
- Changed
write_backend_meta()to usefull_with_opts()by default for all backends exceptcore: - Removed the hardcoded list of backend prefixes that should include options
- Inverted the conditional logic to explicitly exclude only
core:from option persistence
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9a78254 to
739c603
Compare
jdx
reviewed
Oct 29, 2025
739c603 to
40a20ab
Compare
Owner
|
bugbot run |
jdx
pushed a commit
that referenced
this pull request
Nov 1, 2025
### 🐛 Bug Fixes - **(activate)** reset PATH when activate is called multiple times by @jdx in [#6829](#6829) - **(env)** preserve user-configured PATH entries from env._.path by @jdx in [#6835](#6835) - store tool options for all backends in metadata by @roele in [#6807](#6807) ### 📚 Documentation - fix usage spec syntax from 'option' to 'flag' by @jdx in [#6834](#6834) ### 📦️ Dependency Updates - update ghcr.io/jdx/mise:alpine docker digest to 7351bbe by @renovate[bot] in [#6826](#6826) - update ghcr.io/jdx/mise:deb docker digest to 3a847f2 by @renovate[bot] in [#6828](#6828) - update ghcr.io/jdx/mise:copr docker digest to 546dffb by @renovate[bot] in [#6827](#6827) - pin jdx/mise-action action to e3d7b8d by @renovate[bot] in [#6825](#6825)
roele
pushed a commit
to roele/mise
that referenced
this pull request
Nov 2, 2025
- tool options introduced with PR jdx#6807 lead to lookup failures in context of aqua and tool stubs
jdx
pushed a commit
that referenced
this pull request
Nov 3, 2025
…#6867) As mentioned on [Discord](https://discord.com/channels/1066429325269794907/1314301006992900117/1434277261770625155), tool options introduced with PR #6807 lead to lookup failures in context of aqua and tool stubs. The following stub for example will fail to look up the binary because the underlying `Backend:which` call fails. ```bash #!/usr/bin/env -S mise tool-stub version = "0.3.206" tool = "flyctl" bin = "flyctl" ``` ``` ❯ mise tool-stub test_flyctl mise WARN Error listing bin paths for aqua:superfly/flyctl[bin=flyctl]@0.3.206: registry not available: no aqua-registry found for superfly/flyctl[bin=flyctl] mise ERROR Tool 'flyctl' does not have an executable named 'flyctl'. Available executables: flyctl, fly mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information ``` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Strip tool options during Aqua backend ID resolution to fix tool-stub lookups and add an e2e test for flyctl. > > - **Backend**: > - **Aqua**: Use `BackendArg.full_without_opts()` in `AquaBackend::from_arg` to strip option brackets when resolving `id`. > - **Args**: Add `BackendArg::full_without_opts()` to return `full` without `[opts]` while preserving existing `opts()` behavior. > - **Tests**: > - **e2e**: Add Aqua backend tool-stub test for `flyctl` (`0.3.206`) verifying version output and refetch after `mise uninstall --all`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0c56957. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: mise-en-dev <release@mise.jdx.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tool options should be stored in
.mise.backendfor all backends (exceptcore). Since its introduction, new backends have been added which were not storing these. This might lead to misbehaviour on installation and upgrades etc. like querying the wrongapi_urlfor example. This happens when the tool is read from disk (install state) instead of the configuration.Note
Store tool options in backend metadata for all non-core backends and update tests/lookup accordingly.
write_backend_metanow writesfull_with_opts()for all backends exceptcore, ensuring options are persisted in.mise.backend.full_with_optsappends filtered options and preserves existing bracketed options.find_tool_versionnow matches ontv.ba().shortinstead of full identifier.github,gitlab, andhttpbackends to include backend options (e.g.,asset_pattern,bin_path,url) inbackendfield.Written by Cursor Bugbot for commit 40a20ab. This will update automatically on new commits. Configure here.