Flutter from mise-tools sorts versions incorrectly #8812
Unanswered
Attempt3035
asked this question in
Troubleshooting and bug reports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When using
mise use flutter@latest, the wrong flutter version (more than a year old!) is chosen due to incorrect version ordering. This can also be seen in the ordering on the registryThe culprit is:
version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | map({ #.version }) | sortVersions()'which doesn't account for only some of the stable tags having a-stablesuffix, definitely not the new ones. (semver sorting resolves order incorrectly with versions with suffix!)Suggested fix:
version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | map({ replace(#.version, "-stable", "") }) | sortVersions()'This then requires some minor tweaks to the url substitutions. I suggest replacing the entire flutter block with (or equivalent inline):
Also, linux and windows ARM prebuilts do not currently exist and should not be in the url substitutions (they currently are but fail with 404)
This will ensure the nearly 800 monthly downloads of flutter 3.22.1-stable actually start getting the latest stable when they request it, which is as of writing 3.41.6
All reactions