diff --git a/README.md b/README.md index 802901d..41be94b 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,9 @@ A version is a release as `vfox search flutter` prints it: `3.47.4`, or a beta s machine's, and `stable` and `beta` stand for the release the channel points to. Versions are matched whole, so `flutter@3.47` does not select the newest 3.47.x. `vfox use`, `vfox uninstall` and `vfox exec` take the name that is installed, as `vfox list flutter` shows it. -`flutter@latest` is the first line of the list, the newest stable release (Unreleased: release -0.2.4 installs the newest beta). See [docs/versions.md](docs/versions.md) for the names, how -installs are named and the order of the list. +`flutter@latest` is the first line of the list, the newest stable release. See +[docs/versions.md](docs/versions.md) for the names, how installs are named and the order of the +list. ## Channels @@ -75,8 +75,7 @@ and what the tests cover. `flutter@3.47.4-x64` and `flutter@3.47.4-arm64` install a specific build, and a plain name takes the one for the machine. Linux ARM64 and Windows ARM64 install from a git tag, and offer the -releases that run with a native Dart SDK (Unreleased: release 0.2.4 offers older ones, with an -x64 Dart SDK). See [docs/arm64.md](docs/arm64.md) for details. +releases that run with a native Dart SDK. See [docs/arm64.md](docs/arm64.md) for details. ## Mirror diff --git a/README_CN.md b/README_CN.md index 1bc3be4..d31b059 100644 --- a/README_CN.md +++ b/README_CN.md @@ -40,7 +40,7 @@ dart --version ## 版本与命名 -版本就是 `vfox search flutter` 打印出的发布版本:`3.47.4`,或者 `3.50.0-0.1.pre` 这样的 beta。后面加 `-x64` 或 `-arm64`,表示要这个架构而不是本机架构;`stable` 和 `beta` 代表该渠道当前指向的版本。版本必须整串匹配,所以 `flutter@3.47` 不会选中最新的 3.47.x。`vfox use`、`vfox uninstall` 和 `vfox exec` 要写已安装的名字,也就是 `vfox list flutter` 里显示的那个。`flutter@latest` 是列表的第一行,即最新的稳定版(未发布:0.2.4 装的是最新的 beta)。名字、安装后的命名和列表的顺序见 [docs/zh-CN/versions.md](docs/zh-CN/versions.md)。 +版本就是 `vfox search flutter` 打印出的发布版本:`3.47.4`,或者 `3.50.0-0.1.pre` 这样的 beta。后面加 `-x64` 或 `-arm64`,表示要这个架构而不是本机架构;`stable` 和 `beta` 代表该渠道当前指向的版本。版本必须整串匹配,所以 `flutter@3.47` 不会选中最新的 3.47.x。`vfox use`、`vfox uninstall` 和 `vfox exec` 要写已安装的名字,也就是 `vfox list flutter` 里显示的那个。`flutter@latest` 是列表的第一行,即最新的稳定版。名字、安装后的命名和列表的顺序见 [docs/zh-CN/versions.md](docs/zh-CN/versions.md)。 ## 渠道 @@ -52,7 +52,7 @@ x64 和 ARM64 上的 Linux、macOS 和 Windows。各平台从哪里安装、需 ## 架构选择 -`flutter@3.47.4-x64` 和 `flutter@3.47.4-arm64` 安装指定架构的构建,不带后缀的名字则安装本机架构的那个。Linux ARM64 和 Windows ARM64 从 git 标签安装,只提供能用原生 Dart SDK 运行的版本(未发布:0.2.4 还会提供更老的版本,它们用的是 x64 的 Dart SDK)。详见 [docs/zh-CN/arm64.md](docs/zh-CN/arm64.md)。 +`flutter@3.47.4-x64` 和 `flutter@3.47.4-arm64` 安装指定架构的构建,不带后缀的名字则安装本机架构的那个。Linux ARM64 和 Windows ARM64 从 git 标签安装,只提供能用原生 Dart SDK 运行的版本。详见 [docs/zh-CN/arm64.md](docs/zh-CN/arm64.md)。 ## 镜像 diff --git a/docs/arm64.md b/docs/arm64.md index 2d3c91e..6f5cf12 100644 --- a/docs/arm64.md +++ b/docs/arm64.md @@ -144,10 +144,6 @@ and `flutter@1.20.0-x64` on Linux ARM64 is for where you can run x64 programs. T data in `lib/source.lua`, and [development.md](development.md#refreshing-the-dart-sdk-table) shows how to check it. -Unreleased: release 0.2.4 offers a `-arm64` source install of every release that has an x64 -build, and the older ones get the x64 Dart SDK. On Windows ARM64 it runs through the emulation, -under a name that says arm64. On Linux ARM64 an ARM64 machine does not run it. - ## Limits ### Linux ARM64 and Windows ARM64 @@ -171,12 +167,12 @@ under a name that says arm64. On Linux ARM64 an ARM64 machine does not run it. - **Your git configuration applies.** The plugin runs `git` as you do, except for line endings: it sets `core.autocrlf=false` in the checkout, so that a global `true` (which the Git for Windows installer proposes by default) cannot write Flutter's shell scripts with CRLF - line endings. Unreleased: release 0.2.4 takes your setting. With `core.autocrlf=true`, the - checkout of a Linux ARM64 install or of an OpenHarmony build on Linux has CRLF in - `bin/internal/shared.sh` and Flutter's other `.sh` files, because Flutter's `.gitattributes` - forces LF only for `bin/flutter`, `bin/flutter-dev` and `bin/dart`, and the first `flutter` run - stops with `bin/internal/shared.sh: line 5: $'\r': command not found`. Set - `git config --global core.autocrlf input` (or `false`), uninstall the version and install it - again. + line endings. Flutter's `.gitattributes` forces LF only for `bin/flutter`, `bin/flutter-dev` + and `bin/dart`, so with `true` the checkout of a Linux ARM64 install or of an OpenHarmony + build on Linux would have CRLF in `bin/internal/shared.sh` and Flutter's other `.sh` files, + and the first `flutter` run would stop with + `bin/internal/shared.sh: line 5: $'\r': command not found`. Releases before 0.2.5 take your + setting, see + [troubleshooting.md](troubleshooting.md#bininternalsharedsh-line-5-r-command-not-found). - **Leftovers.** A failed install leaves `.vfox/tmp/` behind, see [How a source install works](#how-a-source-install-works). diff --git a/docs/changes.md b/docs/changes.md index 8a92c6d..e2c12bd 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -2,17 +2,17 @@ [中文](zh-CN/changes.md) | [English](changes.md) -What changed in each release, as a user notices it. GitHub's release pages and the pull requests linked below have the rest. The newest release is 0.2.4, and `main` is ahead of it by everything under "Unreleased". [install-from-source.md](install-from-source.md) gets you those changes now. +What changed in each release, as a user notices it. GitHub's release pages and the pull requests linked below have the rest. The newest release is 0.2.5. When `main` is ahead of it, the changes it has are listed first, under "Unreleased", and [install-from-source.md](install-from-source.md) gets you those now. -## Unreleased +## 0.2.5 (2026-10-21) -- Installing an official release no longer asks gitcode.com. Release 0.2.4 asked it for every install, and when gitcode.com rate-limited its API (HTTP 429) an install or a `vfox search` waited up to 6.5 minutes and printed nothing: 212 and 392 seconds on 2026-10-21. `vfox search` and the `latest` of `vfox install` still list the OpenHarmony releases, but they make two attempts, give up at HTTP 429, and print a warning on stderr when they get no list. Installing an OpenHarmony build waits as before. See [troubleshooting.md](troubleshooting.md#gitcodecom-is-rate-limited). -- `3.13.3`, `3.9.0-0.1.pre` and `3.17.0-0.0.pre` install. Flutter uploaded their files again and left the old checksums in the index next to the new ones, and release 0.2.4 could take an old one and end with `checksum error`. The list keeps the newest entry of an archive now, which has the checksum of the file. See [troubleshooting.md](troubleshooting.md#checksum-error). -- OpenHarmony builds that are tagged `+ohos-` are listed and install: `3.41.9+ohos-1.0.2`, `3.35.7+ohos-1.0.5`, `3.27.4+ohos-1.0.9` and `3.22.3+ohos-1.1.6`. See [ohos.md](ohos.md#names-and-releases). -- The checkout of a source install sets `core.autocrlf=false`. With a global `core.autocrlf=true` release 0.2.4 wrote Flutter's shell scripts with CRLF line endings on Linux, for Linux ARM64 and for OpenHarmony builds, and `flutter` stopped with `bin/internal/shared.sh: line 5: $'\r': command not found`. See [arm64.md](arm64.md#limits). -- Linux ARM64 and Windows ARM64 offer a `-arm64` source install only from the first release that runs with a native Dart SDK there, Flutter 2.2.0 and 3.44.0-0.1.pre. Release 0.2.4 offered older ones too, with the x64 Dart SDK: an ARM64 Linux machine does not run it, and Windows runs it through its emulation under a name that says arm64. The `-x64` archives of those releases are still listed. See [arm64.md](arm64.md#releases-that-run-natively). -- `vfox search` lists the stable releases before the pre-releases, so `vfox install flutter@latest` installs the newest stable release (`3.47.7-x64` on 2026-10-21) and not the newest beta (`3.50.0-0.1.pre-x64`). See [versions.md](versions.md#searching). -- The message for a CPU the plugin does not support has its spaces: `flutter does not support the arm architecture`. +- Installing an official release no longer asks gitcode.com ([#50](https://github.com/version-fox/vfox-flutter/pull/50)). Release 0.2.4 asked it for every install, and when gitcode.com rate-limited its API (HTTP 429) an install or a `vfox search` waited up to 6.5 minutes and printed nothing: 212 and 392 seconds on 2026-10-21. `vfox search` and the `latest` of `vfox install` still list the OpenHarmony releases, but they make two attempts, give up at HTTP 429, and print a warning on stderr when they get no list. Installing an OpenHarmony build waits as before. See [troubleshooting.md](troubleshooting.md#gitcodecom-is-rate-limited). +- `3.13.3`, `3.9.0-0.1.pre` and `3.17.0-0.0.pre` install ([#50](https://github.com/version-fox/vfox-flutter/pull/50)). Flutter uploaded their files again and left the old checksums in the index next to the new ones, and release 0.2.4 could take an old one and end with `checksum error`. The list keeps the newest entry of an archive now, which has the checksum of the file. See [troubleshooting.md](troubleshooting.md#checksum-error). +- OpenHarmony builds that are tagged `+ohos-` are listed and install ([#50](https://github.com/version-fox/vfox-flutter/pull/50)): `3.41.9+ohos-1.0.2`, `3.35.7+ohos-1.0.5`, `3.27.4+ohos-1.0.9` and `3.22.3+ohos-1.1.6`. See [ohos.md](ohos.md#names-and-releases). +- The checkout of a source install sets `core.autocrlf=false` ([#50](https://github.com/version-fox/vfox-flutter/pull/50)). With a global `core.autocrlf=true` release 0.2.4 wrote Flutter's shell scripts with CRLF line endings on Linux, for Linux ARM64 and for OpenHarmony builds, and `flutter` stopped with `bin/internal/shared.sh: line 5: $'\r': command not found`. See [arm64.md](arm64.md#limits). +- Linux ARM64 and Windows ARM64 offer a `-arm64` source install only from the first release that runs with a native Dart SDK there, Flutter 2.2.0 and 3.44.0-0.1.pre ([#50](https://github.com/version-fox/vfox-flutter/pull/50)). Release 0.2.4 offered older ones too, with the x64 Dart SDK: an ARM64 Linux machine does not run it, and Windows runs it through its emulation under a name that says arm64. The `-x64` archives of those releases are still listed. See [arm64.md](arm64.md#releases-that-run-natively). +- `vfox search` lists the stable releases before the pre-releases ([#50](https://github.com/version-fox/vfox-flutter/pull/50)), so `vfox install flutter@latest` installs the newest stable release (`3.47.7-x64` on 2026-10-21) and not the newest beta (`3.50.0-0.1.pre-x64`). See [versions.md](versions.md#searching). +- The message for a CPU the plugin does not support has its spaces: `flutter does not support the arm architecture` ([#50](https://github.com/version-fox/vfox-flutter/pull/50)). ## 0.2.4 (2026-10-17) diff --git a/docs/channels.md b/docs/channels.md index e1c5ea4..932b064 100644 --- a/docs/channels.md +++ b/docs/channels.md @@ -51,7 +51,7 @@ The version a channel stands for is the newest `(stable)` or `(beta)` line of `v ## `latest` is not a channel -`vfox install flutter@latest` is vfox's own shorthand for the first line of `vfox search flutter`. That line is the newest stable release, with an architecture suffix (`3.47.7-x64` on 2026-10-21), so `latest` and `stable` install the same Flutter under different names (`3.47.7-x64` and `3.47.7`). Prefer `stable`, see [versions.md](versions.md#searching). Unreleased: release 0.2.4 lists the pre-releases among the stable releases by their numbers, so its first line is the newest beta, and its `latest` installed `3.50.0-0.1.pre-x64`. +`vfox install flutter@latest` is vfox's own shorthand for the first line of `vfox search flutter`. That line is the newest stable release, with an architecture suffix (`3.47.7-x64` on 2026-10-21), so `latest` and `stable` install the same Flutter under different names (`3.47.7-x64` and `3.47.7`). Prefer `stable`, see [versions.md](versions.md#searching). ## `dev` diff --git a/docs/development.md b/docs/development.md index dbe54d9..05a969f 100644 --- a/docs/development.md +++ b/docs/development.md @@ -38,7 +38,7 @@ vfox loads `metadata.lua`, calls a hook when a command needs it, and puts `PLUGI - `Available` returns one table per name with `version`, `url`, `sha256`, `key`, `note` and `addition`. `key` is the git commit of the release, which is how a channel finds its release: `current_release.stable` in the index is a commit, and `PreInstall` takes the entries whose `key` is that commit. `note` is the channel, shown in parentheses. `addition` is the Dart version, shown in brackets. `source = true` is the plugin's own mark for a `-arm64` source install. - `PreInstall` returns `version`, `url` and `sha256`. `version` becomes the name of the install. It is the name without the architecture suffix unless the request had one (`3.47.4` stays `3.47.4`, `3.47.4-x64` stays `3.47.4-x64`), and for a channel the release it stands for. A source install returns the path of a local directory as `url` and no checksum, and vfox moves the directory into place. -- `PreInstall` calls `self:Available({ officialOnly = true })` and so does not use vfox's 12-hour cache of the list. Every install reads the index. `officialOnly` leaves out the OpenHarmony releases: an official install has no use for them, and gitcode.com rate-limits the API they come from. vfox calls `Available` with its own context (`vfox search`, and the `latest` of `vfox install`), and those lists have them. Unreleased: release 0.2.4 asks gitcode.com on every install. +- `PreInstall` calls `self:Available({ officialOnly = true })` and so does not use vfox's 12-hour cache of the list. Every install reads the index. `officialOnly` leaves out the OpenHarmony releases: an official install has no use for them, and gitcode.com rate-limits the API they come from. vfox calls `Available` with its own context (`vfox search`, and the `latest` of `vfox install`), and those lists have them. - `PreInstall` returns `nil` for a name it cannot resolve, which vfox reports as `no installable runtime provided`. It raises an error for a failure: the message of `error()` shows up in the `plugin [PreInstall] method error:` line. - The index lists some releases more than once. `newestPublications` in `hooks/available.lua` keeps the newest entry (`release_date`) of each archive of a version, because a file that was uploaded again has the checksum of the newest entry only (see [troubleshooting.md](troubleshooting.md#checksum-error)). Different versions never merge, and a release in two channels has an archive in each and keeps both. `table.sort` is not stable, so the comparator has to tell any two entries apart, or equal entries come out in an order that depends on the whole input, and `PreInstall` takes the first match. It ends with the version and the channel for that. - `PostInstall` reads `ctx.sdkInfo[PLUGIN.name]`. It runs the manifest and the `pubspec.lock` fix under `pcall`, so a failure there never fails the install. @@ -61,7 +61,7 @@ vfox loads `metadata.lua`, calls a hook when a command needs it, and puts `PLUGI 1. OpenHarmony names after all others (`ohos.isOhosVersion`). 2. The architecture of the machine, and names without a suffix, before the other architecture. -3. Entries of the stable channel (`note == "stable"`) before the others, so that `@latest`, the first line, is the newest stable release and not a beta that has a higher number. Unreleased: release 0.2.4 has no such rule. +3. Entries of the stable channel (`note == "stable"`) before the others, so that `@latest`, the first line, is the newest stable release and not a beta that has a higher number. 4. `compare_versions`, newest first. 5. The architecture of the machine before the other one, and then the plain string order. 6. The channel (`beta` before `dev`), for the same name in two channels. @@ -216,7 +216,7 @@ The Linux row of the table is where the script starts to ask (storage has the SD ## Releasing -A maintainer runs **Actions → Plugin → Run workflow** on the default branch with the version, without `v`. The [README](../README.md#releasing-this-plugin) describes what the shared workflow does. Afterwards `plugins/flutter.json` in [vfox-plugins](https://github.com/version-fox/vfox-plugins) shows the version that `vfox add flutter` serves, and [changes.md](changes.md) should have an entry for it. +A maintainer runs **Actions → Plugin → Run workflow** on the default branch with the version, without `v`. The [README](../README.md#releasing-this-plugin) describes what the shared workflow does. Afterwards `plugins/flutter.json` in [vfox-plugins](https://github.com/version-fox/vfox-plugins) shows the version that `vfox add flutter` serves. That lags the release by hours: 1 h 22 min for 0.2.2, 4 h for 0.2.3 and 2 h 28 min for 0.2.4. Then bring the docs up to date, in both languages: move the "Unreleased" entries of [changes.md](changes.md) under the new version, dated with the day of the release, name that version as the newest one in its first paragraph, put it in the `plugin_version` of the manifest in [flutter-upgrade.md](flutter-upgrade.md#how-the-check-works), and take the "Unreleased" marks out of the other pages, see [Writing the docs](#writing-the-docs). ## Writing the docs diff --git a/docs/flutter-upgrade.md b/docs/flutter-upgrade.md index fc5fdca..ca908c6 100644 --- a/docs/flutter-upgrade.md +++ b/docs/flutter-upgrade.md @@ -76,7 +76,7 @@ recording the expected git HEAD, and re-checks it on each `vfox use`. The manifest is a small JSON file in the root of the SDK, `flutter-3.47.4/.vfox-manifest`: ```json -{"expected_head":"9584c6713b324636289d067944a46fd6b49df14b","installed_at":1792523751,"plugin":"vfox-flutter","plugin_version":"0.2.4","version":"3.47.4"} +{"expected_head":"9584c6713b324636289d067944a46fd6b49df14b","installed_at":1792523751,"plugin":"vfox-flutter","plugin_version":"0.2.5","version":"3.47.4"} ``` `expected_head` is what `git rev-parse HEAD` printed right after vfox unpacked the SDK, and diff --git a/docs/ohos.md b/docs/ohos.md index 7b64d9f..bb4b8e8 100644 --- a/docs/ohos.md +++ b/docs/ohos.md @@ -58,9 +58,7 @@ releases the plugin listed on 2026-10-21, newest first within each line: `3.41.10-ohos-1.0.0 (OpenHarmony)` with no Dart version. That order is why `vfox install flutter@latest` never selects one. -The plugin recognizes a release by `-ohos-` or `+ohos-` in the name of its tag. Unreleased: release 0.2.4 -knows `-ohos-` only. It lists the 21 releases above that have it, and -`vfox install flutter@3.41.9+ohos-1.0.2` ends with `no installable runtime provided`. +The plugin recognizes a release by `-ohos-` or `+ohos-` in the name of its tag. ## How an install works @@ -82,8 +80,7 @@ and ten seconds between attempts after any other error. `vfox search flutter` asks the same API for the list of releases, but it does not wait for it: two attempts, two seconds apart, and HTTP 429 ends them. When the API does not answer, the list has no OpenHarmony names and says so on stderr. Installing an official release does not ask -gitcode.com at all. Unreleased: release 0.2.4 asks it with the same five attempts for every -command that lists versions, and for every install of an official release. +gitcode.com at all. ## Limits @@ -109,9 +106,8 @@ command that lists versions, and for every install of an official release. `GIT_HTTP_LOW_SPEED_TIME` change the threshold. - **gitcode.com rate-limits its API.** An install of an OpenHarmony build waits for it, see above. See [troubleshooting.md](troubleshooting.md#gitcodecom-is-rate-limited). -- **Line endings.** The checkout sets `core.autocrlf=false`. Unreleased: release 0.2.4 takes your - git configuration, and with `core.autocrlf=true` a checkout on Linux has CRLF line endings in - `bin/internal/shared.sh`, so that `flutter` stops with `$'\r': command not found`, see +- **Line endings.** The checkout sets `core.autocrlf=false`, so that a global + `core.autocrlf=true` does not put CRLF line endings into a checkout on Linux, see [arm64.md](arm64.md#limits). ### Building OpenHarmony applications diff --git a/docs/platforms.md b/docs/platforms.md index 75251b4..0f76589 100644 --- a/docs/platforms.md +++ b/docs/platforms.md @@ -32,7 +32,7 @@ What each machine gets for `3.47.4`, `3.47.4-x64` and `3.47.4-arm64` is in [arm6 | `gitcode.com` | the list of OpenHarmony releases (an API request), and the checkout of an OpenHarmony build | the list when `vfox search` or the `latest` of `vfox install` lists versions, and to install an OpenHarmony build; the checkout for OpenHarmony builds only | | `github.com` | the checkout of `flutter/flutter` | Linux ARM64 and Windows ARM64 installs | -`pub.dev` is not the plugin's, but the Flutter tool reaches it when it boots, and the test suite checks that it answers. Installing an official release does not need `gitcode.com`, and a firewall that blocks it costs `vfox search` two quick attempts and a warning, see [troubleshooting.md](troubleshooting.md#gitcodecom-is-rate-limited). Unreleased: release 0.2.4 asks `gitcode.com` for every install as well, and waits for it. +`pub.dev` is not the plugin's, but the Flutter tool reaches it when it boots, and the test suite checks that it answers. Installing an official release does not need `gitcode.com`, and a firewall that blocks it costs `vfox search` two quick attempts and a warning, see [troubleshooting.md](troubleshooting.md#gitcodecom-is-rate-limited). ## What the tests cover diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index cfc28c8..704e1e0 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -19,8 +19,8 @@ The plugin found nothing for the name you typed. The usual reasons: - The name is not a release. `flutter@3.47` and `flutter@3` are not completed to the newest 3.47.x or 3.x, and names are case sensitive (`flutter@Stable`). Look the name up in `vfox search flutter`, see [versions.md](versions.md). - `dev`: Flutter retired the channel, see [channels.md](channels.md#dev). - The architecture suffix does not exist for the machine: `-arm64` on Linux x64 and Windows x64, any suffix on a release without architecture metadata (`1.22.6-x64`), or no suffix for an old release on Apple silicon that only has an x64 build (`flutter@2.10.5` needs `flutter@2.10.5-x64`). See [arm64.md](arm64.md). -- Unreleased: a release that is older than the first that runs with a native Dart SDK, on Linux ARM64 (`flutter@1.20.0`) or Windows ARM64 (`flutter@3.43.0-0.3.pre`). Release 0.2.4 installs them with the x64 Dart SDK, see [arm64.md](arm64.md#releases-that-run-natively). The `-x64` name installs the archive. -- An OpenHarmony name with `+ohos-` (`3.41.9+ohos-1.0.2`) on release 0.2.4, which only knows `-ohos-` names. Unreleased: it knows both, see [ohos.md](ohos.md#names-and-releases). +- A release that is older than the first that runs with a native Dart SDK, on Linux ARM64 (`flutter@1.20.0`) or Windows ARM64 (`flutter@3.43.0-0.3.pre`), see [arm64.md](arm64.md#releases-that-run-natively). The `-x64` name installs the archive. +- An OpenHarmony name with `+ohos-` (`3.41.9+ohos-1.0.2`), when the plugin is older than 0.2.5 and does not know `+ohos-`. Update the plugin, see [ohos.md](ohos.md#names-and-releases). ### `flutter@stable is not installed` @@ -57,7 +57,7 @@ failed to install flutter vfox downloaded the archive and its SHA-256 differs from the one in Flutter's release index. For a mirror, check that it serves the files of the index it serves. Without a mirror this was the data of the index itself: it lists `3.13.3`, `3.9.0-0.1.pre` and `3.17.0-0.0.pre` twice or three times for one file, with a different checksum for each entry. Flutter uploaded the file again and kept the old entries. The checksum of the newest entry is the right one (checked on Linux by downloading the three archives). -The plugin lists only the newest entry of such a file, so these three install. Unreleased: release 0.2.4 lists every entry and installs the one that sorts first, which is arbitrary for entries that are equal, and which also depends on the rest of the list, such as how many OpenHarmony releases it holds. On 2026-10-21 it took an old entry for all three on Linux x64, and for some of them on macOS and Windows, and the install ended as above. Install a release next to it (`3.13.2` or `3.13.4` instead of `3.13.3`), or update the plugin. There is no switch to skip the check. +The plugin lists only the newest entry of such a file, so these three install. Releases before 0.2.5 list every entry and install the one that sorts first. In release 0.2.4 that is arbitrary for entries that are equal, and it also depends on the rest of the list, such as how many OpenHarmony releases it holds. On 2026-10-21 it took an old entry for all three on Linux x64, and for some of them on macOS and Windows, and the install ended as above. Update the plugin, or install a release next to it (`3.13.2` or `3.13.4` instead of `3.13.3`). There is no switch to skip the check. ### `Warning: flutter SDK at ... has drifted from the version vfox installed.` @@ -65,7 +65,7 @@ The plugin lists only the newest entry of such a file, so these three install. U ### `flutter does not support the 386 architecture` -The plugin runs on x64 and ARM64 only. vfox tells it the CPU of its own binary (`386`, `arm`, `riscv64`, `loong64`, ...) and the message names it, as in `flutter does not support the arm architecture`. It stops `vfox search` and the install of an official release. See [platforms.md](platforms.md). Unreleased: release 0.2.4 prints the same without the spaces, `flutter does not support386architecture`. +The plugin runs on x64 and ARM64 only. vfox tells it the CPU of its own binary (`386`, `arm`, `riscv64`, `loong64`, ...) and the message names it, as in `flutter does not support the arm architecture`. It stops `vfox search` and the install of an official release. See [platforms.md](platforms.md). Releases before 0.2.5 print it without the spaces: `flutter does not support386architecture`. ### Source installs: Linux ARM64 and Windows ARM64 @@ -89,7 +89,7 @@ A fetch that moves less than 1 KB/s for a minute is abandoned and counts as a fa | Message | Meaning | | --- | --- | | `OpenHarmony releases are unavailable from https://gitcode.com/api/v5/...: HTTP 429` | Installing an OpenHarmony build: five attempts to read the releases failed. The text after the colon is the last error, here gitcode.com's rate limit, see [below](#gitcodecom-is-rate-limited). Listing versions never prints this message, it prints the warning below and goes on without the OpenHarmony ones | -| `Warning: the OpenHarmony releases could not be read from gitcode.com (), so only the official releases are listed.` | Printed on stderr by `vfox search`, and by the `latest` of `vfox install`, when two attempts did not get the list. The official releases are listed as usual, and an OpenHarmony build still installs by its name. Unreleased: release 0.2.4 prints nothing, and waits up to 6.5 minutes first | +| `Warning: the OpenHarmony releases could not be read from gitcode.com (), so only the official releases are listed.` | Printed on stderr by `vfox search`, and by the `latest` of `vfox install`, when two attempts did not get the list. The official releases are listed as usual, and an OpenHarmony build still installs by its name. | | `flutter 3.47.7-ohos-1.0.0 is not an OpenHarmony release` | The name has `-ohos-` in it, and gitcode.com has no release by that name | | `flutter 3.41.10-ohos-1.0.0 has no architecture variants` | The name had `-x64` or `-arm64` after it | | `failed to fetch from https://gitcode.com/CPF-Flutter/flutter_flutter.git` | All three fetches failed | @@ -98,7 +98,7 @@ See [ohos.md](ohos.md). ### `bin/internal/shared.sh: line 5: $'\r': command not found` -A source install on Linux (Linux ARM64, or an OpenHarmony build) whose first `flutter` run fails like this was checked out with CRLF line endings, because of `core.autocrlf=true` in your git configuration. The plugin now sets `core.autocrlf=false` in the checkout. Unreleased: release 0.2.4 takes your setting, so run `git config --global core.autocrlf input`, uninstall the version and install it again, see [arm64.md](arm64.md#limits). +A source install on Linux (Linux ARM64, or an OpenHarmony build) whose first `flutter` run fails like this was checked out with CRLF line endings, because of `core.autocrlf=true` in your git configuration. Since 0.2.5 the plugin sets `core.autocrlf=false` in the checkout, and older releases took your setting. Update the plugin or run `git config --global core.autocrlf input`, and uninstall the version and install it again: the install you have keeps its CRLF line endings. See [arm64.md](arm64.md#limits). ### `Building flutter tool...` and `It appears that the downloaded file is corrupt` @@ -148,7 +148,7 @@ This is gitcode.com's limit for requests without a login, not a limit of yours: An unreachable gitcode.com costs the same two attempts, so about 2 seconds with a connection that fails at once (measured through a proxy that refused it: 2.1 seconds). `vfox search flutter` is then cached without the OpenHarmony names for 12 hours, and `vfox config cache.availableHookDuration 0` turns the cache off. - Installing an OpenHarmony build makes up to five attempts and waits 30, 60, 120 and 180 seconds between them after a 429, so it can wait for 6.5 minutes and print nothing. -Unreleased: release 0.2.4 waits like that for every command that lists versions, and for every install, official releases included. Measured on 2026-10-21, while gitcode.com was answering 429: +Release 0.2.4 waits like that for every command that lists versions, and for every install, official releases included. Measured on 2026-10-21, while gitcode.com was answering 429: | Command | Took | Result | | --- | --- | --- | @@ -159,9 +159,9 @@ Minutes later the same API answered in a second. Without a 429 a failing request ## Things that look wrong and are not -- **`vfox install flutter@latest` installs `3.47.7-x64`, not `3.47.7`.** `latest` is the first line of `vfox search flutter`, the newest stable release, and it carries the architecture suffix, so the same Flutter installs twice if you also install `stable`, see [versions.md](versions.md#searching). Unreleased: release 0.2.4 installed the newest beta. +- **`vfox install flutter@latest` installs `3.47.7-x64`, not `3.47.7`.** `latest` is the first line of `vfox search flutter`, the newest stable release, and it carries the architecture suffix, so the same Flutter installs twice if you also install `stable`, see [versions.md](versions.md#searching). Release 0.2.4 installed the newest beta. - **A version appears more than once in `vfox search flutter`.** Flutter's index lists it in more than one channel, see [versions.md](versions.md#searching). -- **Unreleased: `vfox search flutter` or `vfox install` waits for minutes and prints nothing.** Release 0.2.4 waits for gitcode.com when it limits its API, see [gitcode.com is rate-limited](#gitcodecom-is-rate-limited). The command finishes by itself. +- **Installing an OpenHarmony build waits for minutes and prints nothing.** The plugin waits for gitcode.com when it limits its API, see [gitcode.com is rate-limited](#gitcodecom-is-rate-limited). The command finishes by itself. Release 0.2.4 does the same for `vfox search flutter` and for every install. - **`(installed)` is missing for a version you installed.** The mark follows listed names, such as `3.47.4-x64`, and not the bare name you installed. `vfox list flutter` is the truth. - **A release you expect is missing from `vfox search`.** vfox keeps the result for 12 hours. `vfox config cache.availableHookDuration 0` turns the cache off. Flutter's index may not have it yet either, or your mirror's copy may not. - **`3.47.4` and `3.47.4-x64` are two installs.** On an x64 machine they are the same Flutter, see [versions.md](versions.md#installed-names). diff --git a/docs/versions.md b/docs/versions.md index 5e8663a..04fbcb9 100644 --- a/docs/versions.md +++ b/docs/versions.md @@ -39,7 +39,7 @@ The plugin lists the releases from Flutter 1.17 (April 2020) on. Flutter publish - vfox verifies the archive against the SHA-256 checksum from the index and prints `Verifying checksum ...`. It removes the archive after unpacking. - On Linux ARM64 and Windows ARM64 the plugin installs a git tag instead of an archive, see [arm64.md](arm64.md). OpenHarmony builds are git checkouts as well, see [ohos.md](ohos.md). Neither is verified against a checksum. - Installing a name that is already there prints `flutter@3.47.4 is already installed` and downloads nothing. -- Installing an official release does not contact gitcode.com. Listing versions does: `vfox search`, and the `latest` of `vfox install`, ask it for the OpenHarmony releases, twice at most, and say so when it does not answer, see [troubleshooting.md](troubleshooting.md#gitcodecom-is-rate-limited). Unreleased: release 0.2.4 asks it for every install as well, waits up to 6.5 minutes when gitcode.com is rate-limited, and says nothing. +- Installing an official release does not contact gitcode.com. Listing versions does: `vfox search`, and the `latest` of `vfox install`, ask it for the OpenHarmony releases, twice at most, and say so when it does not answer, see [troubleshooting.md](troubleshooting.md#gitcodecom-is-rate-limited). An archive is large: 3.47.7 on 2026-10-21 was 1.6 GB for Linux x64, 1.9 GB for Windows x64 and 2.3 GB for macOS. The first `flutter` run downloads more, see [troubleshooting.md](troubleshooting.md#things-that-look-wrong-and-are-not). @@ -146,8 +146,8 @@ $ vfox install flutter@latest Using latest version: 3.47.7-x64 ``` -`latest` keeps to the architecture of this machine, as [arm64.md](arm64.md) explains, and never selects an OpenHarmony build. Unreleased: release 0.2.4 sorts every release by its numbers alone, so a beta of a later minor release (`3.50.0-0.1.pre`) comes before every `3.47.x`, and its `latest` installs that beta, as `3.50.0-0.1.pre-x64`. +`latest` keeps to the architecture of this machine, as [arm64.md](arm64.md) explains, and never selects an OpenHarmony build. -A few versions appear more than once. They are in Flutter's index more than once, because a release was promoted from one channel to another and has an archive in each (`2.13.0-0.1.pre` is listed for beta and for dev), and the lines install the same name. A release that was published again has the same archive under two checksums, and the plugin lists only the newest entry of it (`3.13.3`, `3.9.0-0.1.pre` and `3.17.0-0.0.pre` are the three that Flutter published again). Unreleased: release 0.2.4 lists all the entries, takes the one that happens to sort first, and an install that takes an old one ends with `checksum error`, see [troubleshooting.md](troubleshooting.md#checksum-error). +A few versions appear more than once. They are in Flutter's index more than once, because a release was promoted from one channel to another and has an archive in each (`2.13.0-0.1.pre` is listed for beta and for dev), and the lines install the same name. A release that was published again has the same archive under two checksums, and the plugin lists only the newest entry of it, the one whose checksum matches the file (`3.13.3`, `3.9.0-0.1.pre` and `3.17.0-0.0.pre` are the three that Flutter published again), see [troubleshooting.md](troubleshooting.md#checksum-error). The length of the list depends on the machine. On 2026-10-21 it had 455 names on Linux x64 (430 official releases and 25 OpenHarmony builds), 717 on macOS (692 and 25, with both architectures), 453 on Windows x64, and 743 and 490 on Linux ARM64 and Windows ARM64, which add 288 and 37 source installs. A list that is much shorter than that means the plugin could not read part of its sources, see [troubleshooting.md](troubleshooting.md#network). diff --git a/docs/zh-CN/arm64.md b/docs/zh-CN/arm64.md index f5e2f12..691c194 100644 --- a/docs/zh-CN/arm64.md +++ b/docs/zh-CN/arm64.md @@ -92,8 +92,6 @@ Linux ARM64 和 Windows ARM64 会为“有 x64 构建、并且能用原生 Dart 插件从这个版本开始提供 `-arm64` 源码安装。Linux ARM64 上的 `vfox install flutter@1.20.0`,以及 Windows ARM64 上的 `vfox install flutter@3.43.0-0.3.pre`,都会以 `no installable runtime provided` 结束。更老版本的 x64 压缩包仍然在列表里:`vfox install flutter@3.43.0-0.3.pre-x64` 装的是其中一个,Windows ARM64 靠模拟运行它;Linux ARM64 上的 `flutter@1.20.0-x64` 适合能运行 x64 程序的环境。这张表是 `lib/source.lua` 里的数据,检查方法见 [development.md](development.md#刷新-dart-sdk-表)。 -未发布:0.2.4 为每个有 x64 构建的版本都提供 `-arm64` 源码安装,更老的那些拿到的是 x64 的 Dart SDK。在 Windows ARM64 上它靠模拟运行,名字却写着 arm64;在 Linux ARM64 上,ARM64 的机器运行不了它。 - ## 限制 ### Linux ARM64 和 Windows ARM64 @@ -104,5 +102,5 @@ Linux ARM64 和 Windows ARM64 会为“有 x64 构建、并且能用原生 Dart - **老版本没有 `-arm64` 变体。** 没有架构元数据的版本(比如 `1.22.6`,见上文)保持原有的、只有 x64 的行为。 - **镜像对克隆不起作用。** `FLUTTER_STORAGE_BASE_URL`(见 [mirror.md](mirror.md))只影响发布索引、x64 压缩包和 Flutter 工具自己的下载;源码安装从 GitHub 克隆。要给 GitHub 的源码安装用镜像,请设置 `VFOX_FLUTTER_GITHUB_MIRROR`(见 [mirror.md](mirror.md))。 - **老版本不提供。** 它们用不上原生的 Dart SDK,见[能原生运行的发布版本](#能原生运行的发布版本)。 -- **你的 git 配置同样生效。** 插件以你的身份运行 `git`,只有换行符例外:它会在检出里设置 `core.autocrlf=false`,这样全局的 `true`(Git for Windows 的安装程序默认建议这样设)就不会让 Flutter 的 shell 脚本带上 CRLF 换行。未发布:0.2.4 用的是你自己的设置。设成 `core.autocrlf=true` 时,Linux ARM64 的安装和 Linux 上的 OpenHarmony 构建版本,检出的 `bin/internal/shared.sh` 和 Flutter 其他 `.sh` 文件里都是 CRLF,因为 Flutter 的 `.gitattributes` 只对 `bin/flutter`、`bin/flutter-dev` 和 `bin/dart` 强制使用 LF;第一次运行 `flutter` 就会停在 `bin/internal/shared.sh: line 5: $'\r': command not found`。请执行 `git config --global core.autocrlf input`(或 `false`),卸载这个版本再重新安装。 +- **你的 git 配置同样生效。** 插件以你的身份运行 `git`,只有换行符例外:它会在检出里设置 `core.autocrlf=false`,这样全局的 `true`(Git for Windows 的安装程序默认建议这样设)就不会让 Flutter 的 shell 脚本带上 CRLF 换行。Flutter 的 `.gitattributes` 只对 `bin/flutter`、`bin/flutter-dev` 和 `bin/dart` 强制使用 LF,所以设成 `true` 时,Linux ARM64 的安装和 Linux 上的 OpenHarmony 构建版本,检出的 `bin/internal/shared.sh` 和 Flutter 其他 `.sh` 文件里都会是 CRLF,第一次运行 `flutter` 就会停在 `bin/internal/shared.sh: line 5: $'\r': command not found`。0.2.5 之前的版本用的是你自己的设置,见 [troubleshooting.md](troubleshooting.md#bininternalsharedsh-line-5-r-command-not-found)。 - **残留。** 安装失败会把 `.vfox/tmp/<名称>` 留下,见[源码安装如何进行](#源码安装如何进行)。 diff --git a/docs/zh-CN/changes.md b/docs/zh-CN/changes.md index 8e171e8..d687d71 100644 --- a/docs/zh-CN/changes.md +++ b/docs/zh-CN/changes.md @@ -2,17 +2,17 @@ [中文](changes.md) | [English](../changes.md) -每个版本改了什么,写成用户能感受到的样子。其余的细节见 GitHub 的发布页面和下面链接的 pull request。最新的发布版是 0.2.4,`main` 比它多出“未发布”下的所有内容。想现在就用上这些改动,见 [install-from-source.md](install-from-source.md)。 +每个版本改了什么,写成用户能感受到的样子。其余的细节见 GitHub 的发布页面和下面链接的 pull request。最新的发布版是 0.2.5。`main` 领先于它时,多出来的改动列在最前面的“未发布”下,想现在就用上它们,见 [install-from-source.md](install-from-source.md)。 -## 未发布 +## 0.2.5 (2026-10-21) -- 安装官方版本不再访问 gitcode.com。0.2.4 每次安装都要问它,而 gitcode.com 对它的 API 限流(HTTP 429)时,一次安装或一次 `vfox search` 最多会等 6.5 分钟,什么也不打印:2026-10-21 测得 212 秒和 392 秒。`vfox search` 和 `vfox install` 的 `latest` 仍然会列出 OpenHarmony 的发布版本,但它们只尝试两次,遇到 HTTP 429 就放弃,拿不到列表时在 stderr 上打印一条警告。安装 OpenHarmony 构建版本还是和以前一样会等。见 [troubleshooting.md](troubleshooting.md#gitcodecom-被限流)。 -- `3.13.3`、`3.9.0-0.1.pre` 和 `3.17.0-0.0.pre` 可以安装了。Flutter 重新上传了它们的文件,却把旧的校验和留在索引里,挨着新的,0.2.4 可能取到旧的,以 `checksum error` 结束。现在列表会保留一个压缩包最新的条目,它才有文件的校验和。见 [troubleshooting.md](troubleshooting.md#checksum-error)。 -- 标签是 `+ohos-` 的 OpenHarmony 构建版本会被列出,也可以安装:`3.41.9+ohos-1.0.2`、`3.35.7+ohos-1.0.5`、`3.27.4+ohos-1.0.9` 和 `3.22.3+ohos-1.1.6`。见 [ohos.md](ohos.md#名称与发布版本)。 -- 源码安装的检出会设置 `core.autocrlf=false`。全局 `core.autocrlf=true` 时,0.2.4 在 Linux 上(Linux ARM64 和 OpenHarmony 构建版本)会让 Flutter 的 shell 脚本带上 CRLF 换行,`flutter` 就会停在 `bin/internal/shared.sh: line 5: $'\r': command not found`。见 [arm64.md](arm64.md#限制)。 -- Linux ARM64 和 Windows ARM64 只从第一个能用原生 Dart SDK 运行的版本起提供 `-arm64` 源码安装,分别是 Flutter 2.2.0 和 3.44.0-0.1.pre。0.2.4 也提供更老的版本,用的是 x64 的 Dart SDK:ARM64 的 Linux 机器运行不了它,Windows 靠模拟层运行它,名字却写着 arm64。这些版本的 `-x64` 压缩包仍然在列表里。见 [arm64.md](arm64.md#能原生运行的发布版本)。 -- `vfox search` 把稳定版列在预发布版本之前,所以 `vfox install flutter@latest` 装的是最新的稳定版(2026-10-21 是 `3.47.7-x64`),而不是最新的 beta(`3.50.0-0.1.pre-x64`)。见 [versions.md](versions.md#搜索)。 -- 遇到插件不支持的 CPU 时,提示有了空格:`flutter does not support the arm architecture`。 +- 安装官方版本不再访问 gitcode.com([#50](https://github.com/version-fox/vfox-flutter/pull/50))。0.2.4 每次安装都要问它,而 gitcode.com 对它的 API 限流(HTTP 429)时,一次安装或一次 `vfox search` 最多会等 6.5 分钟,什么也不打印:2026-10-21 测得 212 秒和 392 秒。`vfox search` 和 `vfox install` 的 `latest` 仍然会列出 OpenHarmony 的发布版本,但它们只尝试两次,遇到 HTTP 429 就放弃,拿不到列表时在 stderr 上打印一条警告。安装 OpenHarmony 构建版本还是和以前一样会等。见 [troubleshooting.md](troubleshooting.md#gitcodecom-被限流)。 +- `3.13.3`、`3.9.0-0.1.pre` 和 `3.17.0-0.0.pre` 可以安装了([#50](https://github.com/version-fox/vfox-flutter/pull/50))。Flutter 重新上传了它们的文件,却把旧的校验和留在索引里,挨着新的,0.2.4 可能取到旧的,以 `checksum error` 结束。现在列表会保留一个压缩包最新的条目,它才有文件的校验和。见 [troubleshooting.md](troubleshooting.md#checksum-error)。 +- 标签是 `+ohos-` 的 OpenHarmony 构建版本会被列出,也可以安装([#50](https://github.com/version-fox/vfox-flutter/pull/50)):`3.41.9+ohos-1.0.2`、`3.35.7+ohos-1.0.5`、`3.27.4+ohos-1.0.9` 和 `3.22.3+ohos-1.1.6`。见 [ohos.md](ohos.md#名称与发布版本)。 +- 源码安装的检出会设置 `core.autocrlf=false`([#50](https://github.com/version-fox/vfox-flutter/pull/50))。全局 `core.autocrlf=true` 时,0.2.4 在 Linux 上(Linux ARM64 和 OpenHarmony 构建版本)会让 Flutter 的 shell 脚本带上 CRLF 换行,`flutter` 就会停在 `bin/internal/shared.sh: line 5: $'\r': command not found`。见 [arm64.md](arm64.md#限制)。 +- Linux ARM64 和 Windows ARM64 只从第一个能用原生 Dart SDK 运行的版本起提供 `-arm64` 源码安装,分别是 Flutter 2.2.0 和 3.44.0-0.1.pre([#50](https://github.com/version-fox/vfox-flutter/pull/50))。0.2.4 也提供更老的版本,用的是 x64 的 Dart SDK:ARM64 的 Linux 机器运行不了它,Windows 靠模拟层运行它,名字却写着 arm64。这些版本的 `-x64` 压缩包仍然在列表里。见 [arm64.md](arm64.md#能原生运行的发布版本)。 +- `vfox search` 把稳定版列在预发布版本之前([#50](https://github.com/version-fox/vfox-flutter/pull/50)),所以 `vfox install flutter@latest` 装的是最新的稳定版(2026-10-21 是 `3.47.7-x64`),而不是最新的 beta(`3.50.0-0.1.pre-x64`)。见 [versions.md](versions.md#搜索)。 +- 遇到插件不支持的 CPU 时,提示有了空格:`flutter does not support the arm architecture`([#50](https://github.com/version-fox/vfox-flutter/pull/50))。 ## 0.2.4 (2026-10-17) diff --git a/docs/zh-CN/channels.md b/docs/zh-CN/channels.md index 049f149..b7670e8 100644 --- a/docs/zh-CN/channels.md +++ b/docs/zh-CN/channels.md @@ -51,7 +51,7 @@ vfox 只认已安装的名字。渠道在插件安装的过程中就换成了具 ## `latest` 不是渠道 -`vfox install flutter@latest` 是 vfox 自己的简写,指的是 `vfox search flutter` 的第一行。那一行是最新的稳定版,带着架构后缀(2026-10-21 时是 `3.47.7-x64`),所以 `latest` 和 `stable` 装的是同一个 Flutter,只是名字不同(`3.47.7-x64` 和 `3.47.7`)。优先用 `stable`,见 [versions.md](versions.md#搜索)。未发布:0.2.4 按版本号里的数字把预发布版本和稳定版混在一起排,所以它的第一行是最新的 beta,它的 `latest` 装的是 `3.50.0-0.1.pre-x64`。 +`vfox install flutter@latest` 是 vfox 自己的简写,指的是 `vfox search flutter` 的第一行。那一行是最新的稳定版,带着架构后缀(2026-10-21 时是 `3.47.7-x64`),所以 `latest` 和 `stable` 装的是同一个 Flutter,只是名字不同(`3.47.7-x64` 和 `3.47.7`)。优先用 `stable`,见 [versions.md](versions.md#搜索)。 ## `dev` diff --git a/docs/zh-CN/development.md b/docs/zh-CN/development.md index 27b836a..56b4834 100644 --- a/docs/zh-CN/development.md +++ b/docs/zh-CN/development.md @@ -38,7 +38,7 @@ vfox 加载 `metadata.lua`,在命令需要时调用 hook,并把 `PLUGIN` 和 - `Available` 为每个名字返回一个表,里面有 `version`、`url`、`sha256`、`key`、`note` 和 `addition`。`key` 是这个版本的 git 提交,渠道就是靠它找到自己的版本:索引里的 `current_release.stable` 是一个提交,`PreInstall` 取 `key` 等于这个提交的条目。`note` 是渠道,显示在圆括号里。`addition` 是 Dart 版本,显示在方括号里。`source = true` 是插件自己给 `-arm64` 源码安装做的标记。 - `PreInstall` 返回 `version`、`url` 和 `sha256`。`version` 会成为安装的名字。除非请求带了架构后缀,名字里就不带后缀(`3.47.4` 还是 `3.47.4`,`3.47.4-x64` 还是 `3.47.4-x64`),渠道则换成它代表的版本。源码安装返回的 `url` 是本地目录的路径,没有校验和,由 vfox 把这个目录移动到位。 -- `PreInstall` 调用的是 `self:Available({ officialOnly = true })`,所以用不到 vfox 对列表的 12 小时缓存。每次安装都要读索引。`officialOnly` 会略去 OpenHarmony 发布版本:官方版本的安装用不着它们,而且它们来自的 API 被 gitcode.com 限流。vfox 用它自己的上下文调用 `Available`(`vfox search`,以及 `vfox install` 的 `latest`),那样的列表里有它们。未发布:0.2.4 每次安装都会去问 gitcode.com。 +- `PreInstall` 调用的是 `self:Available({ officialOnly = true })`,所以用不到 vfox 对列表的 12 小时缓存。每次安装都要读索引。`officialOnly` 会略去 OpenHarmony 发布版本:官方版本的安装用不着它们,而且它们来自的 API 被 gitcode.com 限流。vfox 用它自己的上下文调用 `Available`(`vfox search`,以及 `vfox install` 的 `latest`),那样的列表里有它们。 - `PreInstall` 对解析不了的名字返回 `nil`,vfox 会把它报告成 `no installable runtime provided`。失败时它会抛出错误:`error()` 的内容会出现在 `plugin [PreInstall] method error:` 那一行里。 - 索引里有些版本不止列了一次。`hooks/available.lua` 里的 `newestPublications` 对一个版本的每个压缩包只保留最新(`release_date`)的那条,因为重新上传过的文件,只有最新那条的校验和才是对的(见 [troubleshooting.md](troubleshooting.md#checksum-error))。不同的版本绝不会合并,在两个渠道里的版本各有一个压缩包,两条都保留。`table.sort` 不是稳定排序,所以比较函数必须能区分任意两个条目,否则相等的条目出来的顺序取决于整个输入,而 `PreInstall` 取第一个匹配的。为此比较函数最后还比较版本和渠道。 - `PostInstall` 读取 `ctx.sdkInfo[PLUGIN.name]`。清单和 `pubspec.lock` 的修正都在 `pcall` 里运行,所以那里的失败永远不会让安装失败。 @@ -61,7 +61,7 @@ vfox 加载 `metadata.lua`,在命令需要时调用 hook,并把 `PLUGIN` 和 1. OpenHarmony 的名字排在所有其他名字之后(`ohos.isOhosVersion`)。 2. 本机架构,以及没有后缀的名字,排在另一个架构之前。 -3. stable 渠道的条目(`note == "stable"`)排在其他条目之前,这样第一行 `@latest` 就是最新的稳定版,而不是数字更大的 beta。未发布:0.2.4 没有这条规则。 +3. stable 渠道的条目(`note == "stable"`)排在其他条目之前,这样第一行 `@latest` 就是最新的稳定版,而不是数字更大的 beta。 4. `compare_versions`,新的在前。 5. 本机架构排在另一个之前,然后是普通的字符串顺序。 6. 渠道(`beta` 在 `dev` 之前),用于同一个名字在两个渠道里的情况。 @@ -216,7 +216,7 @@ done ## 发布 -维护者在默认分支上执行 **Actions → Plugin → Run workflow**,填入不带 `v` 的版本号。共享工作流做了什么,见 [README](../../README_CN.md#发布这个插件)。之后 [vfox-plugins](https://github.com/version-fox/vfox-plugins) 里的 `plugins/flutter.json` 会显示 `vfox add flutter` 提供的版本,[changes.md](changes.md) 里也应当有这个版本的条目。 +维护者在默认分支上执行 **Actions → Plugin → Run workflow**,填入不带 `v` 的版本号。共享工作流做了什么,见 [README](../../README_CN.md#发布这个插件)。之后 [vfox-plugins](https://github.com/version-fox/vfox-plugins) 里的 `plugins/flutter.json` 会显示 `vfox add flutter` 提供的版本。这比发布晚几个小时:0.2.2 晚了 1 小时 22 分钟,0.2.3 晚了 4 小时,0.2.4 晚了 2 小时 28 分钟。然后把文档更新到位,两种语言都要:把 [changes.md](changes.md) 里“未发布”下的条目挪到新版本下面,标上发布当天的日期,在它的第一段里把新版本写成最新的发布版,把它写进 [flutter-upgrade.md](flutter-upgrade.md#检查如何进行) 里清单的 `plugin_version`,并去掉其他页面里的“未发布”标记,见[编写文档](#编写文档)。 ## 编写文档 diff --git a/docs/zh-CN/flutter-upgrade.md b/docs/zh-CN/flutter-upgrade.md index c2c97a7..64614a4 100644 --- a/docs/zh-CN/flutter-upgrade.md +++ b/docs/zh-CN/flutter-upgrade.md @@ -64,7 +64,7 @@ To upgrade to a newer version, use vfox directly: 清单是 SDK 根目录里的一个小 JSON 文件,`flutter-3.47.4/.vfox-manifest`: ```json -{"expected_head":"9584c6713b324636289d067944a46fd6b49df14b","installed_at":1792523751,"plugin":"vfox-flutter","plugin_version":"0.2.4","version":"3.47.4"} +{"expected_head":"9584c6713b324636289d067944a46fd6b49df14b","installed_at":1792523751,"plugin":"vfox-flutter","plugin_version":"0.2.5","version":"3.47.4"} ``` `expected_head` 是 vfox 刚解压完 SDK 时 `git rev-parse HEAD` 打印的结果,`installed_at` 是安装时间,单位是自 1970 年以来的秒数。`vfox use` 时检查会再执行一次 `git rev-parse HEAD`,并比较两者。压缩包安装、源码安装和 OpenHarmony 构建版本都会有清单。在 SDK 里执行 `git status`,这个文件会显示为未跟踪。 diff --git a/docs/zh-CN/ohos.md b/docs/zh-CN/ohos.md index 97aa6f9..aee18c1 100644 --- a/docs/zh-CN/ohos.md +++ b/docs/zh-CN/ohos.md @@ -45,7 +45,7 @@ vfox search flutter `vfox search flutter` 把它们排在最后,在所有官方版本之后,每个显示为 `3.41.10-ohos-1.0.0 (OpenHarmony)`,没有 Dart 版本。因为这个顺序,`vfox install flutter@latest` 永远不会选中其中一个。 -插件靠标签名里有 `-ohos-` 或 `+ohos-` 来认出一个发布版本。未发布:0.2.4 只认 `-ohos-`,列出的是上表里带它的 21 个,`vfox install flutter@3.41.9+ohos-1.0.2` 会以 `no installable runtime provided` 结束。 +插件靠标签名里有 `-ohos-` 或 `+ohos-` 来认出一个发布版本。 ## 安装如何进行 @@ -55,7 +55,7 @@ vfox search flutter 得到的是只含一个提交的浅克隆,3.41.10-ohos-1.0.0 是 224 MB,网速很快时安装用了 19 秒。安装会等待 gitcode.com:它的 API 回答 HTTP 429(被限流)时,插件在五次尝试之间依次等 30、60、120 和 180 秒,遇到其他错误则每次间隔十秒。 -`vfox search flutter` 向同一个 API 取发布版本的列表,但不会等它:最多两次,间隔两秒,遇到 HTTP 429 就停。API 没有响应时,列表里没有 OpenHarmony 的名字,并在 stderr 上说明这一点。安装官方版本完全不会访问 gitcode.com。未发布:0.2.4 对每个列出版本的命令,以及每次官方版本的安装,都会用同样的五次尝试去问它。 +`vfox search flutter` 向同一个 API 取发布版本的列表,但不会等它:最多两次,间隔两秒,遇到 HTTP 429 就停。API 没有响应时,列表里没有 OpenHarmony 的名字,并在 stderr 上说明这一点。安装官方版本完全不会访问 gitcode.com。 ## 限制 @@ -68,7 +68,7 @@ vfox search flutter - **镜像不起作用。** `FLUTTER_STORAGE_BASE_URL` 和 `VFOX_FLUTTER_GITHUB_MIRROR`(见 [mirror.md](mirror.md))只影响官方 SDK 的下载;OpenHarmony 构建版本是从 gitcode 克隆的,所以这两个变量都会被忽略。 - **卡住的克隆会重试。** 从 gitcode 拉取时如果卡住(一分钟内速度低于 1 KB/s),会被放弃并重试,最多三次;`GIT_HTTP_LOW_SPEED_LIMIT` / `GIT_HTTP_LOW_SPEED_TIME` 可以改这个阈值。 - **gitcode.com 会对它的 API 限流。** 安装 OpenHarmony 构建版本时会等它,见上文。另见 [troubleshooting.md](troubleshooting.md#gitcodecom-被限流)。 -- **换行符。** 检出时会设置 `core.autocrlf=false`。未发布:0.2.4 用的是你自己的 git 配置,设成 `core.autocrlf=true` 时,Linux 上的检出里 `bin/internal/shared.sh` 是 CRLF 换行,`flutter` 会停在 `$'\r': command not found`,见 [arm64.md](arm64.md#限制)。 +- **换行符。** 检出时会设置 `core.autocrlf=false`,这样全局的 `core.autocrlf=true` 就不会让 Linux 上的检出带上 CRLF 换行,见 [arm64.md](arm64.md#限制)。 ### 构建 OpenHarmony 应用 diff --git a/docs/zh-CN/platforms.md b/docs/zh-CN/platforms.md index f98c8b2..b0526dd 100644 --- a/docs/zh-CN/platforms.md +++ b/docs/zh-CN/platforms.md @@ -32,7 +32,7 @@ OpenHarmony 构建版本在每种机器上都是从 gitcode.com 检出的,见 | `gitcode.com` | OpenHarmony 版本的列表(一个 API 请求),以及 OpenHarmony 构建版本的检出 | `vfox search` 或 `vfox install` 的 `latest` 列出版本时要列表,安装 OpenHarmony 构建版本时也要;检出只在 OpenHarmony 构建版本时 | | `github.com` | `flutter/flutter` 的检出 | Linux ARM64 和 Windows ARM64 的安装 | -`pub.dev` 不是插件要连的,但 Flutter 工具启动时会连它,测试套件也会检查它能否访问。安装官方版本不需要 `gitcode.com`,防火墙挡住它,也只是让 `vfox search` 快速试两次并给出一条警告,见 [troubleshooting.md](troubleshooting.md#gitcodecom-被限流)。未发布:0.2.4 每次安装也要问 `gitcode.com`,并且会等它。 +`pub.dev` 不是插件要连的,但 Flutter 工具启动时会连它,测试套件也会检查它能否访问。安装官方版本不需要 `gitcode.com`,防火墙挡住它,也只是让 `vfox search` 快速试两次并给出一条警告,见 [troubleshooting.md](troubleshooting.md#gitcodecom-被限流)。 ## 测试覆盖的范围 diff --git a/docs/zh-CN/troubleshooting.md b/docs/zh-CN/troubleshooting.md index 3601021..40188e9 100644 --- a/docs/zh-CN/troubleshooting.md +++ b/docs/zh-CN/troubleshooting.md @@ -19,8 +19,8 @@ failed to install flutter - 这个名字不是一个发布版本。`flutter@3.47` 和 `flutter@3` 不会补全成最新的 3.47.x 或 3.x,名字也区分大小写(`flutter@Stable`)。到 `vfox search flutter` 里查一下,见 [versions.md](versions.md)。 - `dev`:Flutter 已经废弃这个渠道,见 [channels.md](channels.md#dev)。 - 架构后缀在这台机器上不存在:Linux x64 和 Windows x64 上的 `-arm64`,没有架构元数据的版本带任何后缀(`1.22.6-x64`),或者 Apple 芯片上只有 x64 构建的老版本不带后缀(`flutter@2.10.5` 要写成 `flutter@2.10.5-x64`)。见 [arm64.md](arm64.md)。 -- 未发布:比第一个能用原生 Dart SDK 运行的版本更老的版本,在 Linux ARM64(`flutter@1.20.0`)或 Windows ARM64(`flutter@3.43.0-0.3.pre`)上。0.2.4 会用 x64 的 Dart SDK 装上它们,见 [arm64.md](arm64.md#能原生运行的发布版本)。写成 `-x64` 的名字装的是压缩包。 -- 带 `+ohos-` 的 OpenHarmony 名字(`3.41.9+ohos-1.0.2`),在 0.2.4 上,它只认 `-ohos-` 的名字。未发布:两种都认,见 [ohos.md](ohos.md#名称与发布版本)。 +- 比第一个能用原生 Dart SDK 运行的版本更老的版本,在 Linux ARM64(`flutter@1.20.0`)或 Windows ARM64(`flutter@3.43.0-0.3.pre`)上,见 [arm64.md](arm64.md#能原生运行的发布版本)。写成 `-x64` 的名字装的是压缩包。 +- 带 `+ohos-` 的 OpenHarmony 名字(`3.41.9+ohos-1.0.2`),而插件比 0.2.5 更老,不认识 `+ohos-`。请更新插件,见 [ohos.md](ohos.md#名称与发布版本)。 ### `flutter@stable is not installed` @@ -57,7 +57,7 @@ failed to install flutter vfox 下载了压缩包,它的 SHA-256 和 Flutter 发布索引里的不一样。用镜像的话,要检查镜像提供的文件是否与它提供的索引一致。不用镜像时,这曾经是索引数据本身的问题:它把 `3.13.3`、`3.9.0-0.1.pre` 和 `3.17.0-0.0.pre` 各列了两三次,同一个文件,每条的校验和都不同。Flutter 重新上传了文件,却把旧的条目留着了。最新那条的校验和才是对的(在 Linux 上下载了这三个压缩包验证过)。 -插件现在只列这种文件最新的那一条,所以这三个版本都能装。未发布:0.2.4 把所有条目都列出来,装排在最前面的那条,条目相同时顺序是任意的,还取决于列表的其余部分,比如其中有多少个 OpenHarmony 版本。2026-10-21 时,它在 Linux x64 上三个全都取了旧条目,在 macOS 和 Windows 上也有一部分,安装就会像上面这样结束。请装它旁边的版本(用 `3.13.2` 或 `3.13.4` 代替 `3.13.3`),或者更新插件。没有跳过校验的开关。 +插件现在只列这种文件最新的那一条,所以这三个版本都能装。0.2.5 之前的版本把所有条目都列出来,装排在最前面的那条。在 0.2.4 里,条目相同时顺序是任意的,还取决于列表的其余部分,比如其中有多少个 OpenHarmony 版本。2026-10-21 时,它在 Linux x64 上三个全都取了旧条目,在 macOS 和 Windows 上也有一部分,安装就会像上面这样结束。请更新插件,或者装它旁边的版本(用 `3.13.2` 或 `3.13.4` 代替 `3.13.3`)。没有跳过校验的开关。 ### `Warning: flutter SDK at ... has drifted from the version vfox installed.` @@ -65,7 +65,7 @@ vfox 下载了压缩包,它的 SHA-256 和 Flutter 发布索引里的不一样 ### `flutter does not support the 386 architecture` -插件只能在 x64 和 ARM64 上运行。vfox 会把它自己二进制的 CPU(`386`、`arm`、`riscv64`、`loong64` 等)告诉插件,提示里会写出它,比如 `flutter does not support the arm architecture`。`vfox search` 和官方版本的安装都会被它拦住。见 [platforms.md](platforms.md)。未发布:0.2.4 打印的内容一样,只是没有空格,是 `flutter does not support386architecture`。 +插件只能在 x64 和 ARM64 上运行。vfox 会把它自己二进制的 CPU(`386`、`arm`、`riscv64`、`loong64` 等)告诉插件,提示里会写出它,比如 `flutter does not support the arm architecture`。`vfox search` 和官方版本的安装都会被它拦住。见 [platforms.md](platforms.md)。0.2.5 之前的版本打印的内容一样,只是没有空格:`flutter does not support386architecture`。 ### 源码安装:Linux ARM64 和 Windows ARM64 @@ -89,7 +89,7 @@ vfox 下载了压缩包,它的 SHA-256 和 Flutter 发布索引里的不一样 | 提示 | 含义 | | --- | --- | | `OpenHarmony releases are unavailable from https://gitcode.com/api/v5/...: HTTP 429` | 安装 OpenHarmony 构建版本时:五次读取发布版本列表都失败了。冒号后面是最后一次的错误,这里是 gitcode.com 的限流,见[下文](#gitcodecom-被限流)。列出版本时永远不会打印这条,它会打印下面那条警告,然后在没有 OpenHarmony 版本的情况下继续 | -| `Warning: the OpenHarmony releases could not be read from gitcode.com (), so only the official releases are listed.` | 两次尝试都没拿到列表时,由 `vfox search` 和 `vfox install` 的 `latest` 打印到 stderr。官方版本照常列出,OpenHarmony 构建版本仍然可以按名字安装。未发布:0.2.4 什么都不打印,而且先要等最多 6.5 分钟 | +| `Warning: the OpenHarmony releases could not be read from gitcode.com (), so only the official releases are listed.` | 两次尝试都没拿到列表时,由 `vfox search` 和 `vfox install` 的 `latest` 打印到 stderr。官方版本照常列出,OpenHarmony 构建版本仍然可以按名字安装。 | | `flutter 3.47.7-ohos-1.0.0 is not an OpenHarmony release` | 名字里有 `-ohos-`,但 gitcode.com 上没有叫这个名字的发布版本 | | `flutter 3.41.10-ohos-1.0.0 has no architecture variants` | 名字后面带了 `-x64` 或 `-arm64` | | `failed to fetch from https://gitcode.com/CPF-Flutter/flutter_flutter.git` | 三次拉取全都失败了 | @@ -98,7 +98,7 @@ vfox 下载了压缩包,它的 SHA-256 和 Flutter 发布索引里的不一样 ### `bin/internal/shared.sh: line 5: $'\r': command not found` -在 Linux 上做源码安装(Linux ARM64,或者 OpenHarmony 构建版本)后,第一次运行 `flutter` 就这样失败,说明检出的是 CRLF 换行,原因是你的 git 配置里有 `core.autocrlf=true`。插件现在会在检出里设置 `core.autocrlf=false`。未发布:0.2.4 用的是你的设置,请执行 `git config --global core.autocrlf input`,卸载这个版本再重新安装,见 [arm64.md](arm64.md#限制)。 +在 Linux 上做源码安装(Linux ARM64,或者 OpenHarmony 构建版本)后,第一次运行 `flutter` 就这样失败,说明检出的是 CRLF 换行,原因是你的 git 配置里有 `core.autocrlf=true`。从 0.2.5 起,插件会在检出里设置 `core.autocrlf=false`,更老的版本用的是你的设置。请更新插件,或者执行 `git config --global core.autocrlf input`,并卸载这个版本再重新安装:已有的安装保留着 CRLF 换行。见 [arm64.md](arm64.md#限制)。 ### `Building flutter tool...` 和 `It appears that the downloaded file is corrupt` @@ -148,7 +148,7 @@ gitcode.com 限制匿名客户端的请求次数。超出限制时它回答 HTTP gitcode.com 无法访问时同样只花这两次尝试,所以连接立刻失败的话大约 2 秒(经过一个拒绝连接的代理测得 2.1 秒)。之后 `vfox search flutter` 会在没有 OpenHarmony 名字的情况下缓存 12 小时,`vfox config cache.availableHookDuration 0` 可以关掉缓存。 - 安装 OpenHarmony 构建版本最多尝试五次,遇到 429 后依次等 30、60、120 和 180 秒,所以它可能等 6.5 分钟而且什么都不打印。 -未发布:0.2.4 对每个列出版本的命令,以及每次安装(包括官方版本),都要这样等。2026-10-21 gitcode.com 回答 429 的时候测得: +0.2.4 对每个列出版本的命令,以及每次安装(包括官方版本),都要这样等。2026-10-21 gitcode.com 回答 429 的时候测得: | 命令 | 耗时 | 结果 | | --- | --- | --- | @@ -159,9 +159,9 @@ gitcode.com 限制匿名客户端的请求次数。超出限制时它回答 HTTP ## 看起来不对但其实正常的现象 -- **`vfox install flutter@latest` 装出来的是 `3.47.7-x64`,不是 `3.47.7`。** `latest` 是 `vfox search flutter` 的第一行,也就是最新的稳定版,而且它带着架构后缀,所以你再装一次 `stable` 的话,同一个 Flutter 会装两份,见 [versions.md](versions.md#搜索)。未发布:0.2.4 装的是最新的 beta。 +- **`vfox install flutter@latest` 装出来的是 `3.47.7-x64`,不是 `3.47.7`。** `latest` 是 `vfox search flutter` 的第一行,也就是最新的稳定版,而且它带着架构后缀,所以你再装一次 `stable` 的话,同一个 Flutter 会装两份,见 [versions.md](versions.md#搜索)。0.2.4 装的是最新的 beta。 - **一个版本在 `vfox search flutter` 里出现了不止一次。** Flutter 的索引里它在不止一个渠道里,见 [versions.md](versions.md#搜索)。 -- **未发布:`vfox search flutter` 或 `vfox install` 等了好几分钟,什么也没打印。** 0.2.4 在 gitcode.com 限制它的 API 时会等,见 [gitcode.com 被限流](#gitcodecom-被限流)。命令自己会结束。 +- **安装 OpenHarmony 构建版本等了好几分钟,什么也没打印。** gitcode.com 限制它的 API 时,插件会等,见 [gitcode.com 被限流](#gitcodecom-被限流)。命令自己会结束。0.2.4 对 `vfox search flutter` 和每次安装也是这样。 - **你装过的版本在 `(installed)` 标记里没有。** 标记跟的是列表里打印的名字,比如 `3.47.4-x64`,而不是你装的不带后缀的名字。以 `vfox list flutter` 为准。 - **预期的版本在 `vfox search` 里没有。** vfox 会把结果缓存 12 小时。`vfox config cache.availableHookDuration 0` 可以关掉缓存。也可能是 Flutter 的索引里还没有它,或者你的镜像那份里还没有。 - **`3.47.4` 和 `3.47.4-x64` 是两份安装。** 在 x64 机器上它们是同一个 Flutter,见 [versions.md](versions.md#已安装的名称)。 diff --git a/docs/zh-CN/versions.md b/docs/zh-CN/versions.md index f05542c..ffdd5a5 100644 --- a/docs/zh-CN/versions.md +++ b/docs/zh-CN/versions.md @@ -39,7 +39,7 @@ vfox install flutter@3.41.10-ohos-1.0.0 # OpenHarmony 构建版本 - vfox 用索引里的 SHA-256 校验和验证压缩包,并打印 `Verifying checksum ...`。解压之后会删除压缩包。 - 在 Linux ARM64 和 Windows ARM64 上,插件安装的是 git 标签而不是压缩包,见 [arm64.md](arm64.md)。OpenHarmony 构建版本同样是 git 检出,见 [ohos.md](ohos.md)。两者都不做校验和验证。 - 安装一个已经存在的名字,会打印 `flutter@3.47.4 is already installed`,不会下载任何东西。 -- 安装官方版本不会访问 gitcode.com。列出版本才会:`vfox search` 和 `vfox install` 的 `latest` 会去问它有哪些 OpenHarmony 版本,最多两次,问不到时会提示,见 [troubleshooting.md](troubleshooting.md#gitcodecom-被限流)。未发布:0.2.4 每次安装也要问它,gitcode.com 限流时最多会等 6.5 分钟,而且什么都不说。 +- 安装官方版本不会访问 gitcode.com。列出版本才会:`vfox search` 和 `vfox install` 的 `latest` 会去问它有哪些 OpenHarmony 版本,最多两次,问不到时会提示,见 [troubleshooting.md](troubleshooting.md#gitcodecom-被限流)。 压缩包很大:2026-10-21 的 3.47.7,Linux x64 是 1.6 GB,Windows x64 是 1.9 GB,macOS 是 2.3 GB。第一次运行 `flutter` 还会再下载东西,见 [troubleshooting.md](troubleshooting.md#看起来不对但其实正常的现象)。 @@ -146,8 +146,8 @@ $ vfox install flutter@latest Using latest version: 3.47.7-x64 ``` -`latest` 会保持在本机架构上,原因见 [arm64.md](arm64.md),而且永远不会选中 OpenHarmony 构建版本。未发布:0.2.4 只按版本号里的数字给所有版本排序,所以更新的小版本的 beta(`3.50.0-0.1.pre`)排在所有 `3.47.x` 之前,它的 `latest` 装的就是那个 beta,即 `3.50.0-0.1.pre-x64`。 +`latest` 会保持在本机架构上,原因见 [arm64.md](arm64.md),而且永远不会选中 OpenHarmony 构建版本。 -有些版本会出现不止一次。它们在 Flutter 的索引里就不止一条:有的是从一个渠道晋升到另一个渠道,每个渠道各有一个压缩包(`2.13.0-0.1.pre` 在 beta 和 dev 里都有),这几行装出来的名字相同。有的是版本重新发布过,同一个压缩包对应两个校验和,插件只列其中最新的那条(Flutter 重新发布过的有 `3.13.3`、`3.9.0-0.1.pre` 和 `3.17.0-0.0.pre` 这三个)。未发布:0.2.4 会把所有条目都列出来,装排在最前面的那条;如果装到了旧条目,安装会以 `checksum error` 结束,见 [troubleshooting.md](troubleshooting.md#checksum-error)。 +有些版本会出现不止一次。它们在 Flutter 的索引里就不止一条:有的是从一个渠道晋升到另一个渠道,每个渠道各有一个压缩包(`2.13.0-0.1.pre` 在 beta 和 dev 里都有),这几行装出来的名字相同。有的是版本重新发布过,同一个压缩包对应两个校验和,插件只列其中最新的那条,也就是校验和与文件相符的那条(Flutter 重新发布过的有 `3.13.3`、`3.9.0-0.1.pre` 和 `3.17.0-0.0.pre` 这三个),见 [troubleshooting.md](troubleshooting.md#checksum-error)。 列表有多长取决于机器。2026-10-21 的数量:Linux x64 是 455 个名字(430 个官方版本和 25 个 OpenHarmony 构建版本),macOS 是 717 个(692 个和 25 个,两种架构都在),Windows x64 是 453 个,Linux ARM64 和 Windows ARM64 分别是 743 个和 490 个,它们多出来的 288 个和 37 个是源码安装。列表比这短得多,说明插件有一部分数据来源没读到,见 [troubleshooting.md](troubleshooting.md#网络)。