fix(aqua): use versions list to install correct version#5371
Conversation
dea2d3f to
f21113c
Compare
2f0ec65 to
fe71a40
Compare
|
If you are adding a new tool to mise, note the following:
|
I commented out `biome` test as the latest version `2.0.0` cannot be installed until this fix will be merged. #5371
|
I'm thinking about how to cache them, and I've now realised we need to cache them in However, I think including metadata (e.g. source GitHub tags for the aqua backend) in it requires us to parse, and makes mise slower. So I'm now thinking of caching parsed Aqua packages. I mean, saving |
|
I think this is now ready to be merged. However, there are no remote caches for |
This reverts commit 28982e6.
027e9f6 to
29bfa42
Compare
|
I made a table to compare the behaviour. (Expected behaviours are just my guess)
|
6cb2791 to
60ff607
Compare
### 🚀 Features - **(registry)** add wash by [@jtakakura](https://github.com/jtakakura) in [#5386](#5386) ### 🐛 Bug Fixes - **(aqua)** parse consecutive pipes in aqua templates by [@risu729](https://github.com/risu729) in [#5385](#5385) - **(aqua)** use versions list to install correct version by [@risu729](https://github.com/risu729) in [#5371](#5371) - **(registry)** talosctl use aqua by [@mangkoran](https://github.com/mangkoran) in [#5348](#5348) - **(registry)** use aqua backend for watchexec by [@risu729](https://github.com/risu729) in [#5390](#5390) - **(shim)** improve resolve_symlink for Windows by [@qianlongzt](https://github.com/qianlongzt) in [#5361](#5361) - add compression-zip-deflate feature on self_update crate for windows target by [@roele](https://github.com/roele) in [#5391](#5391) - suppress hint on 'cargo search mise' command by [@roele](https://github.com/roele) in [#5400](#5400) ### 📚 Documentation - Fix typo in README.md - Install mise by [@cytsai1008](https://github.com/cytsai1008) in [#5366](#5366) - Document trivial task syntax by [@JayBazuzi](https://github.com/JayBazuzi) in [#5352](#5352) ### 🧪 Testing - **(registry)** fix vultr test by [@risu729](https://github.com/risu729) in [#5372](#5372) ### 📦️ Dependency Updates - update autofix-ci/action action to v1.3.2 by [@renovate[bot]](https://github.com/renovate[bot]) in [#5377](#5377) - update docker/setup-buildx-action digest to e468171 by [@renovate[bot]](https://github.com/renovate[bot]) in [#5376](#5376) ### Chore - update expr-lang crate to v0.3.2 by [@risu729](https://github.com/risu729) in [#5364](#5364) - show curl error by [@jdx](https://github.com/jdx) in [729aa4a](729aa4a) - fix latest version fetch by [@jdx](https://github.com/jdx) in [729aadc](729aadc) - update vfox.rs crate to v1.0.3 by [@risu729](https://github.com/risu729) in [#5393](#5393) - updated deps by [@jdx](https://github.com/jdx) in [#5403](#5403) ### Ci - use cargo info to retrieve latest mise version by [@risu729](https://github.com/risu729) in [#5401](#5401) ### New Contributors - @jtakakura made their first contribution in [#5386](#5386) - @JayBazuzi made their first contribution in [#5352](#5352) - @cytsai1008 made their first contribution in [#5366](#5366)
My apologies, #5371 broke the version order in `ls-remote`. I misused `BTreeMap`, the key was `String`, not semver, so the versions were just compared lexicographically. This PR fixes the regression by using `Vec<(String, String)>` instead of `BTreeMap`. I can also use `IndexMap`, but it seemed it's only used in `build.rs` so I guessed it's not preffered.
My apologies, jdx#5371 broke the version order in `ls-remote`. I misused `BTreeMap`, the key was `String`, not semver, so the versions were just compared lexicographically. This PR fixes the regression by using `Vec<(String, String)>` instead of `BTreeMap`. I can also use `IndexMap`, but it seemed it's only used in `build.rs` so I guessed it's not preffered.
Fixes the issue I wrote in #5371 (comment). The cause of the issue was that mise tried to find the `version_override` with a v-prefixed version. For example, even if the input was the full GitHub tag like `@biomejs/biome@2.0.0-beta.5`, it tried to find the override for `v@biomejs/biome@2.0.0-beta.5`. This led to it finding the fallback override, which has `cli/` for the `version_prefix`. The simple fix is to find the override without the v-prefix. However, this would break packages that rely on the v-prefix in the `version_constraint`. So, I ended up finding the override that matches either the input version or the v-prefixed version. This means it tries to find the first override that matches one of `v@biomejs/biome@2.0.0-beta.5` or `@biomejs/biome@2.0.0-beta.5` for the previous example. In this way, we can correctly find the override for most packages. Also, this PR removes the retry logic when a GitHub tag is found from `get_version_tags` or if the input version already has a `v` prefix. This will allow it to fail fast and also simplify the error log. Package | Version String | `2025.6.8` | #5474 -- | -- | -- | -- biome | 2.0.0 |✅ | ✅ biome | [@biomejs/biome@2.0.0](https://github.com/biomejs/biome/releases/tag/%40biomejs%2Fbiome%402.0.0) (tag) | ❌ | ✅ biome | v2.0.0 | ❌ | ❌ biome | 2.0.0-beta.5 | ❌ | ❌ biome | [@biomejs/biome@2.0.0-beta.5](https://github.com/biomejs/biome/releases/tag/%40biomejs%2Fbiome%402.0.0-beta.5) (tag) | ❌ |✅ biome | v2.0.0-beta.5 | ❌ |❌ biome | 1.9.4 | ✅ | ✅ biome | v1.9.4 (tag without prefix) | ✅ | ✅ biome | [cli/v1.9.4](https://github.com/biomejs/biome/releases/tag/cli%2Fv1.9.4) (tag) | ❌ | ✅ delta | [0.18.2](https://github.com/dandavison/delta/releases/tag/0.18.2) (tag) | ✅ | ✅ delta | v0.18.2 | ❌ |❌ eza | 0.21.4 | ✅ | ✅ eza | [v0.21.4](https://github.com/eza-community/eza/releases/tag/v0.21.4) (tag) | ✅ | ✅ --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Fixes #5246.
I need to cache, maybe just the GitHub tag instead of the whole
AquaPacakge?At least, I can install
biome@2.0.0with this fix.