Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)。

## 渠道

Expand All @@ -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)。

## 镜像

Expand Down
18 changes: 7 additions & 11 deletions docs/arm64.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/<name>` behind, see
[How a source install works](#how-a-source-install-works).
18 changes: 9 additions & 9 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docs/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
6 changes: 3 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/flutter-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 4 additions & 8 deletions docs/ohos.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down
Loading
Loading