Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the Flutter registry configuration by replacing a generic URL template with explicit platform-specific definitions and updating the version expression to strip the '-stable' suffix. A review comment correctly identifies that support for windows-arm64 was unintentionally dropped in this transition and provides a suggestion to restore it.
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_{{ version }}-stable.zip' | ||
|
|
||
| [backends.options.platforms.windows-x64] | ||
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_{{ version }}-stable.zip' |
There was a problem hiding this comment.
The previous generic url also generated URLs for windows-arm64. By switching to explicit platform definitions, support for windows-arm64 seems to have been unintentionally dropped. To prevent a regression, please consider adding a definition for it.
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_{{ version }}-stable.zip' | |
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_{{ version }}-stable.zip' | |
| [backends.options.platforms.windows-arm64] | |
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_arm64_{{ version }}-stable.zip' |
There was a problem hiding this comment.
Pull request overview
Updates the Flutter registry entry to improve version ordering for stable releases by normalizing the version strings used for sorting.
Changes:
- Strip the
-stablesuffix from Flutter release versions before applyingsortVersions(). - Simplify download URL templates to use the normalized version and append
-stablein the archive name. - Replace the prior shared URL template with explicit per-platform URLs (linux/macos/windows).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [backends.options] | ||
| version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | map({ #.version }) | sortVersions()' | ||
| version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | map({ replace(#.version, "-stable", "") }) | sortVersions()' | ||
| version_list_url = "https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json" |
There was a problem hiding this comment.
The PR description is about version sorting, but this hunk also removes the shared url template (and related comments) and switches to fully platform-specific URLs. If that broader change isn’t intentional, consider keeping the existing shared url and only adjusting version_expr/replace usage to minimize behavioral drift.
|
|
||
| [backends.options.platforms.windows-x64] | ||
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_{{ version }}-stable.zip' | ||
|
|
There was a problem hiding this comment.
Removing the previous shared url (which used arch(..., arm64="_arm64")) drops implicit support for additional platforms like windows-arm64. If Flutter does provide those archives (or if this registry entry previously intended to support them), please add an explicit windows-arm64 platform URL or restore the shared URL+arch mapping to avoid a regression on ARM64 Windows.
| [backends.options.platforms.windows-arm64] | |
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_arm64_{{ version }}-stable.zip' |
Greptile SummaryThis PR fixes a version-sorting regression for the Key changes:
Confidence Score: 5/5Safe to merge — the fix correctly normalises version strings to unblock sorting, and all platform URL templates produce the same archive filenames as before. All findings are P2 style suggestions (a missing comment explaining intent, and a note about potential linux-arm64 / windows-arm64 entries). There are no logic errors, no broken URLs, and no data-loss scenarios. The semantic change is equivalent to the old approach for modern releases and correct for legacy entries. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant mise
participant FlutterAPI as Flutter Releases JSON<br/>(releases_linux.json)
participant Storage as GCS Storage
mise->>FlutterAPI: GET version_list_url
FlutterAPI-->>mise: JSON body with releases[]
mise->>mise: filter({ #.channel == "stable" })
mise->>mise: map({ replace(#.version, "-stable", "") })
mise->>mise: sortVersions() → clean list e.g. ["3.27.0", ...]
Note over mise: User selects version e.g. 3.27.0
alt linux-x64
mise->>Storage: GET flutter_linux_3.27.0-stable.tar.xz
else macos-x64
mise->>Storage: GET flutter_macos_3.27.0-stable.zip
else macos-arm64
mise->>Storage: GET flutter_macos_arm64_3.27.0-stable.zip
else windows-x64
mise->>Storage: GET flutter_windows_3.27.0-stable.zip
end
Storage-->>mise: archive download
Reviews (1): Last reviewed commit: "registry: fix flutter version sorting" | Re-trigger Greptile |
|
|
||
| [backends.options] | ||
| version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | map({ #.version }) | sortVersions()' | ||
| version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | map({ replace(#.version, "-stable", "") }) | sortVersions()' |
There was a problem hiding this comment.
replace is a no-op for current releases
According to the live Flutter releases JSON at storage.googleapis.com/flutter_infra_release/releases/releases_linux.json, current stable-channel release entries contain a plain version string (e.g. "3.27.0") with no "-stable" suffix — the suffix appears only in the archive filename, not the version field. The replace(#.version, "-stable", "") call is therefore a no-op for all modern releases.
If the motivation was that older historical entries in the JSON do carry the suffix (which would explain the broken sorting), a brief inline comment documenting that intent would help future maintainers understand why the replace is there at all:
| version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | map({ replace(#.version, "-stable", "") }) | sortVersions()' | |
| version_expr = 'fromJSON(body).releases | filter({ #.channel == "stable" }) | map({ replace(#.version, "-stable", "") }) | sortVersions()' # some older entries have "-stable" in the version field |
| # Linux uses .tar.xz instead of .zip | ||
| [backends.options.platforms.linux-x64] | ||
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_{{ version | replace(from="-stable", to="") }}-stable.tar.xz' | ||
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_{{ version }}-stable.tar.xz' | ||
|
|
||
| # Note: Flutter doesn't officially provide linux-arm64 builds, but use correct format if they add support | ||
| [backends.options.platforms.linux-arm64] | ||
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_arm64_{{ version | replace(from="-stable", to="") }}-stable.tar.xz' | ||
| [backends.options.platforms.macos-x64] | ||
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_{{ version }}-stable.zip' | ||
|
|
||
| [backends.options.platforms.macos-arm64] | ||
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_{{ version }}-stable.zip' | ||
|
|
||
| [backends.options.platforms.windows-x64] | ||
| url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_{{ version }}-stable.zip' |
There was a problem hiding this comment.
Missing
linux-arm64 and windows-arm64 platform entries
The previous code included a (speculative) linux-arm64 entry with a note that Flutter didn't officially support it. Flutter has been progressively shipping official Linux ARM64 builds since the 3.x era, and as of recent stable releases they appear in the releases_linux.json feed. Removing the entry means Linux ARM64 users will silently fall through to the asdf: / vfox: backends rather than using the fast HTTP backend.
Similarly, Flutter now ships experimental Windows ARM64 archives, so a windows-arm64 entry may be warranted.
If official ARM64 artifacts exist in the JSON today it may be worth re-adding the entry (or at least leaving a # TODO comment):
# Uncomment when Flutter ships official linux-arm64 builds in the releases JSON
# [backends.options.platforms.linux-arm64]
# url = 'https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_arm64_{{ version }}-stable.tar.xz'|
Thx. Related #7863 . |
### 🚀 Features - **(python)** add GitHub provenance verification for prebuilt binaries by @malept in [#8820](#8820) ### 🐛 Bug Fixes - **(ci)** use rustls-native-roots for Windows CI build by @jdx in [#8822](#8822) - **(go)** improve version fetching logic to support deeply nested sub-modules by @roele in [#8823](#8823) - **(shim)** prevent infinite recursion when system shims dir is on PATH by @andrewthauer in [#8816](#8816) - go backend missing supports_lockfile_url() override by @palootcenas-outreach in [#8790](#8790) - strip shims from PATH in credential and template subprocesses by @antonioacg in [#8802](#8802) ### 📚 Documentation - fix typo in shims documentation for fish by @roele in [#8798](#8798) ### 📦️ Dependency Updates - update ghcr.io/jdx/mise:alpine docker digest to 3e6d001 by @renovate[bot] in [#8794](#8794) - pin dependencies by @renovate[bot] in [#8793](#8793) ### 📦 Registry - fix flutter version sorting by @roele in [#8818](#8818) - add svgo (npm:svgo) by @3w36zj6 in [#8817](#8817) ### New Contributors - @antonioacg made their first contribution in [#8802](#8802) - @palootcenas-outreach made their first contribution in [#8790](#8790) ## 📦 Aqua Registry Updates #### New Packages (3) - [`RasKrebs/sonar`](https://github.com/RasKrebs/sonar) - [`emacs-eask/cli`](https://github.com/emacs-eask/cli) - [`superradcompany/microsandbox`](https://github.com/superradcompany/microsandbox) #### Updated Packages (4) - [`dimo414/bkt`](https://github.com/dimo414/bkt) - [`lxc/incus`](https://github.com/lxc/incus) - [`shinagawa-web/gomarklint`](https://github.com/shinagawa-web/gomarklint) - [`updatecli/updatecli`](https://github.com/updatecli/updatecli)
As mentioned in #8812