Skip to content

fix: store tool version opts in .mise.backend#4960

Merged
jdx merged 3 commits into
jdx:mainfrom
roele:issues/playground-tool-version-opts
Apr 28, 2025
Merged

fix: store tool version opts in .mise.backend#4960
jdx merged 3 commits into
jdx:mainfrom
roele:issues/playground-tool-version-opts

Conversation

@roele

@roele roele commented Apr 28, 2025

Copy link
Copy Markdown
Contributor

Less intrusive solution as replacement for #4886. This stores the tool options used when installing to the full representation in .mise.backend which allows the BackendArg to properly parse and initialize the backend.

That solves the following use case which currently fails because tool options are not available when tools are initialized from install state.

mise use ubi:gitlab-org/cli[provider=gitlab,exe=glab]@1.55.0
sed -i '' 's/version = "1.55.0"/version = "latest"/' mise.toml
mise cache clear
mise outdated

@jdx jdx enabled auto-merge (squash) April 28, 2025 15:23
auto-merge was automatically disabled April 28, 2025 15:41

Head branch was pushed to by a user without write access

@roele roele force-pushed the issues/playground-tool-version-opts branch from 173100f to 0a3a69a Compare April 28, 2025 15:44
@roele roele changed the title refactor: store tool version opts in .mise.backend fix: store tool version opts in .mise.backend Apr 28, 2025
@roele roele force-pushed the issues/playground-tool-version-opts branch from 0a3a69a to 4ec9038 Compare April 28, 2025 16:21
@efussi

efussi commented Apr 28, 2025

Copy link
Copy Markdown
Contributor

fwiw, I tested mise built from this PR's branch and based on a quick smoke test it also solves the 404 error I was getting when doing a mise up with tools installed from GH Enterprise. I had to clean the existing tool directories from ~/.local/share/mise/installs first, though.

@roele

roele commented Apr 28, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for verifying @efussi! Yes since this forces to store the full tool string in .mise.backend a "new" installation of the tool is required.

@jdx jdx merged commit b6749d7 into jdx:main Apr 28, 2025
@roele roele deleted the issues/playground-tool-version-opts branch April 28, 2025 21:32
jdx pushed a commit that referenced this pull request Apr 29, 2025
### 🐛 Bug Fixes

- **(aqua)** fix bin_path of tools in monorepo by
[@risu729](https://github.com/risu729) in
[#4954](#4954)
- **(schema)** allow array of objects for hooks by
[@risu729](https://github.com/risu729) in
[#4955](#4955)
- store tool version opts in .mise.backend by
[@roele](https://github.com/roele) in
[#4960](#4960)

### 📚 Documentation

- add information about the DNF repository by
[@acesyde](https://github.com/acesyde) in
[#4956](#4956)

### 🧪 Testing

- fix registry tools by [@jdx](https://github.com/jdx) in
[#4959](#4959)

### Chore

- **(deny)** added CDLA-Permissive-2.0 by [@jdx](https://github.com/jdx)
in [#4961](#4961)
jdx pushed a commit that referenced this pull request May 26, 2025
According to the discussion #5001 the change #4960 to support GH
Enterprise/GitLab is causing a regression for certain tools (e.g. aqua)
because of the global ToolOption argument `postinstall`. To address this
we should filter the global once on install arguments and only store
ToolOptions for certain backends (`cargo`, `go`, `pipx`, `ubi`)
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.

3 participants