From add7cadc4ba999e37ca590cd3845b17b7d1654e2 Mon Sep 17 00:00:00 2001 From: Qiheng He Date: Tue, 3 Nov 2026 14:48:35 +0800 Subject: [PATCH 1/2] docs: move the unreleased changes under 0.6.5, drop the 0.6.4 remarks and correct what the docs say about the checksum of Corretto After the release: - `docs/changes.md` and its translation: "Unreleased" becomes 0.6.5 (2026-11-03), and the sentence about `main` being ahead of the latest release goes. - `docs/sdkmanrc.md` and its translation: the "Unreleased: release 0.6.4 ..." remark goes. `changes.md` has what it said. Corrected, found while comparing the quoted data with Foojay: - `docs/foojay.md`, `docs/troubleshooting.md`, the 0.6.4 entry of `docs/changes.md` and their translations said that Corretto 8 comes with a checksum file and that only the releases after 8 do not. Foojay lists an MD5 file only on a record without a build number (`8`, and likewise 11 to 25), which the plugin never installs. `java@8-amzn` installs `8.0.512-amzn`, like every other Corretto install, and vfox warns that there is no checksum. - The checksum table and its example in `docs/foojay.md` were compared again, so their date is 2026-11-03. --- docs/changes.md | 6 +++--- docs/foojay.md | 8 ++++---- docs/sdkmanrc.md | 2 +- docs/troubleshooting.md | 2 +- docs/zh-CN/changes.md | 6 +++--- docs/zh-CN/foojay.md | 8 ++++---- docs/zh-CN/sdkmanrc.md | 2 +- docs/zh-CN/troubleshooting.md | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/changes.md b/docs/changes.md index 86f7e36..8fcf76f 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -2,15 +2,15 @@ [中文](zh-CN/changes.md) | [English](changes.md) -What changed in each release, as a user notices it. GitHub's release pages list the pull requests. The newest release at the time of writing is 0.6.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 list the pull requests. -## Unreleased +## 0.6.5 (2026-11-03) - A `.sdkmanrc` takes SDKMAN's identifiers of Oracle GraalVM and GraalVM Community, which write the fifth number of GraalVM's version after the `+`: `java=25.0.5.0+3-graal` selects `25.0.5.0.3-graal`, and `java=25.4.4.1+1-graalce` selects `25.4.4.1.1-graalce`. Release 0.6.4 takes that number for a build of the release 25.0.5 and finds no such name. So it selects `25.0.5-graal` where that is installed next to `25.0.5.0.3-graal`, which is a different download (Oracle ships `25.0.5`, `25.0.5.0.2` and `25.0.5.0.3` as three files), and otherwise the newest installed release of 25: a project pinned to `25.0.5.0+3-graal` moves to a newer GraalVM as soon as one is installed. See [sdkmanrc.md](sdkmanrc.md#sdkmans-spellings) ([#124](https://github.com/version-fox/vfox-java/pull/124)). ## 0.6.4 (2026-11-03) -- vfox verifies a download against the checksum Foojay lists for it. Release 0.6.3 gives vfox no checksum, so every install ends with `WARNING: Checksum is not provided, skip verify...` and trusts the download, though Foojay lists a checksum for most distributions. Now `vfox install java@25.0.2-graalce` prints `Verifying checksum e0be791c...` instead, and a download that does not match stops with `Checksum error` and installs nothing. Foojay lists none for Dragonwell, Bisheng, Trava, AdoptOpenJDK, OpenLogic, Gluon GraalVM, Corretto after 8 and the older releases of several others, and vfox still warns about those. A checksum file on GitHub goes through `VFOX_JAVA_GITHUB_MIRROR` like the download. Where the plugin cannot use a checksum that Foojay lists, it prints why (`Cannot verify the download: ...`) and installs as before. See [foojay.md](foojay.md#checksums). +- vfox verifies a download against the checksum Foojay lists for it. Release 0.6.3 gives vfox no checksum, so every install ends with `WARNING: Checksum is not provided, skip verify...` and trusts the download, though Foojay lists a checksum for most distributions. Now `vfox install java@25.0.2-graalce` prints `Verifying checksum e0be791c...` instead, and a download that does not match stops with `Checksum error` and installs nothing. Foojay lists none for Dragonwell, Bisheng, Trava, AdoptOpenJDK, OpenLogic, Gluon GraalVM, Corretto and the older releases of several others, and vfox still warns about those. A checksum file on GitHub goes through `VFOX_JAVA_GITHUB_MIRROR` like the download. Where the plugin cannot use a checksum that Foojay lists, it prints why (`Cannot verify the download: ...`) and installs as before. See [foojay.md](foojay.md#checksums). ## 0.6.3 (2026-10-20) diff --git a/docs/foojay.md b/docs/foojay.md index 82c1683..9a69679 100644 --- a/docs/foojay.md +++ b/docs/foojay.md @@ -153,7 +153,7 @@ So the plugin asks for every package of these two, as `vfox search` does, and pi ## Checksums -The record that `links.pkg_info_uri` points to also says how to check the download. `checksum_type` is the algorithm, and the digest is in the record as `checksum`, or in a file of the vendor that `checksum_uri` points to. GraalVM Community 25.0.2 has the file only (2026-11-02): +The record that `links.pkg_info_uri` points to also says how to check the download. `checksum_type` is the algorithm, and the digest is in the record as `checksum`, or in a file of the vendor that `checksum_uri` points to. GraalVM Community 25.0.2 has the file only (2026-11-03): ```bash curl -s 'https://api.foojay.io/disco/v3.0/packages/jdks?distribution=graalvm_community&version=25.0.2&architecture=amd64&operating_system=linux&lib_c_type=glibc&archive_type=tar.gz&directly_downloadable=true' \ @@ -176,13 +176,13 @@ The digest in Foojay's record goes first. It comes from Foojay and not from the A file that lists several packages gives the line of the one being installed. One that lists others only gives none: Microsoft's file for its EA build of 11.0.14 for macOS names the GA build, and that digest would fail an install that is fine. -Which packages come with a checksum varies by release, and Foojay holds none for some distributions. For the newest releases (2026-11-02): +Which packages come with a checksum varies by release, and Foojay holds none for some distributions. For the newest releases (2026-11-03): | Foojay lists | Short names | | --- | --- | | the digest in the record | `tem`, `zulu`, `librca`, `nik`, `eliya`, `rdht`, `mandrel` from 25, the newest `graal` and `graalce` | -| a file of the vendor | `open`, `oracle`, `ms`, `sapmchn`, `sem`, `semcrt`, `jb`, `kona`, `ojdkbld`, `grl8`, `grl11`, `grl16`, `grl17`, `grl19`, the older `graal` and `graalce`, and Corretto 8 (`amzn`) | -| no checksum | `albba`, `bsg`, `trava`, `adpt`, `adptj9`, `gln`, `opnlgc`, `amzn` other than Corretto 8, and the older releases of several of the others | +| a file of the vendor | `open`, `oracle`, `ms`, `sapmchn`, `sem`, `semcrt`, `jb`, `kona`, `ojdkbld`, `grl8`, `grl11`, `grl16`, `grl17`, `grl19`, and the older `graal` and `graalce` | +| no checksum | `albba`, `bsg`, `trava`, `adpt`, `adptj9`, `gln`, `opnlgc`, `amzn`, and the older releases of several of the others | For a package with none, vfox prints `WARNING: Checksum is not provided, skip verify...` and trusts the download. diff --git a/docs/sdkmanrc.md b/docs/sdkmanrc.md index dc72e8b..150d28f 100644 --- a/docs/sdkmanrc.md +++ b/docs/sdkmanrc.md @@ -69,7 +69,7 @@ SDKMAN writes the JDK into some versions of Mandrel and Liberica NIK as well, wh The number after `+` in SDKMAN's newer identifiers is a build number, the vendor's (`25.0.5.0+8-tem` is Temurin's build 8, installed as `25.0.5+8-tem`) or SDKMAN's own count of its rebuilds (`21.0.8+1.1-tem`). The plugin looks for an installed build of that number first and otherwise takes the release. Foojay, and so the installed name, has no zero padding, which is why `27.0.0` means the release `27`. A `.0` padding in `sdk list java` is common (`25.0.1.0+8-open`, `21.0.9.0+116386-jbr`), and the plugin reads it as well. -Oracle GraalVM and GraalVM Community are the exception. Their versions have five numbers (`25.0.5.0.3`) where SDKMAN's identifiers have four before the `+`, so SDKMAN writes the fifth after it: `25.0.5.0+3-graal` is GraalVM 25.0.5.0.3, and `25.4.4.1+1-graalce` is the feature release 25.4.4.1.1. That number belongs to the release. Oracle ships `25.0.5`, `25.0.5.0.2` and `25.0.5.0.3` as three different files. The plugin looks for the installed name with the dot first, and failing that goes on with steps 2 and 3 as for any release that is not installed. `vfox install` takes the dotted name only (`java@25.0.5.0.3-graal`), not the identifier. Unreleased: release 0.6.4 takes the number for a build of the release `25.0.5`. So it selects `25.0.5-graal` when that is installed next to `25.0.5.0.3-graal`, and a newer release of 25 when that is installed instead. +Oracle GraalVM and GraalVM Community are the exception. Their versions have five numbers (`25.0.5.0.3`) where SDKMAN's identifiers have four before the `+`, so SDKMAN writes the fifth after it: `25.0.5.0+3-graal` is GraalVM 25.0.5.0.3, and `25.4.4.1+1-graalce` is the feature release 25.4.4.1.1. That number belongs to the release. Oracle ships `25.0.5`, `25.0.5.0.2` and `25.0.5.0.3` as three different files. The plugin looks for the installed name with the dot first, and failing that goes on with steps 2 and 3 as for any release that is not installed. `vfox install` takes the dotted name only (`java@25.0.5.0.3-graal`), not the identifier. ## Not finding it diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index ecc809e..8a9922c 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -74,7 +74,7 @@ While `proxy.enable` is `false`, the usual `HTTP_PROXY`, `HTTPS_PROXY` and `NO_P ## Things that look wrong and are not - **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. Foojay itself may not have the release yet either. -- **`WARNING: Checksum is not provided, skip verify...` when a JDK installs.** Foojay lists no checksum for that package (Dragonwell, Bisheng, Trava, AdoptOpenJDK, OpenLogic, Gluon GraalVM, Corretto after 8, and older releases of several others), so vfox has nothing to verify the download against and trusts it. Where Foojay lists one, vfox prints `Verifying checksum ...` instead, see [foojay.md](foojay.md#checksums). +- **`WARNING: Checksum is not provided, skip verify...` when a JDK installs.** Foojay lists no checksum for that package (Dragonwell, Bisheng, Trava, AdoptOpenJDK, OpenLogic, Gluon GraalVM, Corretto, and older releases of several others), so vfox has nothing to verify the download against and trusts it. Where Foojay lists one, vfox prints `Verifying checksum ...` instead, see [foojay.md](foojay.md#checksums). - **The installed name has a build number you did not type.** `java@21.0.8-tem` installs `21.0.8+9-tem`. The build is part of the name, see [versions.md](versions.md#installed-names). - **`vfox install java@21-tem` and `vfox install java tem` do different things.** The second one is two SDKs, `java` and `tem`. - **A `GRAALVM_HOME` you set is left alone.** The plugin sets `JAVA_HOME` and `PATH` only. diff --git a/docs/zh-CN/changes.md b/docs/zh-CN/changes.md index 98304c7..c4f67eb 100644 --- a/docs/zh-CN/changes.md +++ b/docs/zh-CN/changes.md @@ -2,15 +2,15 @@ [中文](changes.md) | [English](../changes.md) -按发布版本列出用户能感受到的变化。GitHub 的 Release 页面列出了对应的 PR。写这篇文档时最新的发布版是 0.6.4,`main` 比它多出“未发布”下面的所有内容。想现在就用上这些变化,见 [install-from-source.md](install-from-source.md)。 +按发布版本列出用户能感受到的变化。GitHub 的 Release 页面列出了对应的 PR。 -## 未发布 +## 0.6.5(2026-11-03) - `.sdkmanrc` 里写 SDKMAN 给 Oracle GraalVM 和 GraalVM 社区版的标识符时,会选中它指明的版本。SDKMAN 把这两个发行版版本号的第五位写在 `+` 后面:`java=25.0.5.0+3-graal` 选中 `25.0.5.0.3-graal`,`java=25.4.4.1+1-graalce` 选中 `25.4.4.1.1-graalce`。0.6.4 把这个数字当作 25.0.5 的构建号,找不到这样的名字,于是 `25.0.5-graal` 和 `25.0.5.0.3-graal` 都装着时选中前者,而它们是不同的下载(Oracle 把 `25.0.5`、`25.0.5.0.2` 和 `25.0.5.0.3` 发布成了三个文件);没装 `25.0.5-graal` 时则选 25 里已安装的最新版本:钉在 `25.0.5.0+3-graal` 上的项目,一装了更新的 GraalVM 就会换过去。见 [sdkmanrc.md](sdkmanrc.md#sdkman-的写法)([#124](https://github.com/version-fox/vfox-java/pull/124))。 ## 0.6.4(2026-11-03) -- vfox 会按 Foojay 给出的校验和校验下载的文件。0.6.3 不给 vfox 任何校验和,所以每次安装最后都有 `WARNING: Checksum is not provided, skip verify...`,下载的内容照单全收,尽管 Foojay 给大多数发行版都列了校验和。现在 `vfox install java@25.0.2-graalce` 会打印 `Verifying checksum e0be791c...`,下载的文件对不上校验和时以 `Checksum error` 终止,什么也不会装上。Dragonwell、Bisheng、Trava、AdoptOpenJDK、OpenLogic、Gluon GraalVM、8 以后的 Corretto,以及其余发行版里较旧的版本,Foojay 没有校验和,vfox 对这些仍然会警告。GitHub 上的校验和文件和下载一样经过 `VFOX_JAVA_GITHUB_MIRROR`。Foojay 给了校验和而插件用不上时,插件会打印原因(`Cannot verify the download: ...`),安装照旧。见 [foojay.md](foojay.md#校验和)。 +- vfox 会按 Foojay 给出的校验和校验下载的文件。0.6.3 不给 vfox 任何校验和,所以每次安装最后都有 `WARNING: Checksum is not provided, skip verify...`,下载的内容照单全收,尽管 Foojay 给大多数发行版都列了校验和。现在 `vfox install java@25.0.2-graalce` 会打印 `Verifying checksum e0be791c...`,下载的文件对不上校验和时以 `Checksum error` 终止,什么也不会装上。Dragonwell、Bisheng、Trava、AdoptOpenJDK、OpenLogic、Gluon GraalVM、Corretto,以及其余发行版里较旧的版本,Foojay 没有校验和,vfox 对这些仍然会警告。GitHub 上的校验和文件和下载一样经过 `VFOX_JAVA_GITHUB_MIRROR`。Foojay 给了校验和而插件用不上时,插件会打印原因(`Cannot verify the download: ...`),安装照旧。见 [foojay.md](foojay.md#校验和)。 ## 0.6.3(2026-10-20) diff --git a/docs/zh-CN/foojay.md b/docs/zh-CN/foojay.md index f77dcc1..48ffb71 100644 --- a/docs/zh-CN/foojay.md +++ b/docs/zh-CN/foojay.md @@ -153,7 +153,7 @@ curl -s 'https://api.foojay.io/disco/v3.0/packages/jdks?distribution=mandrel&dis ## 校验和 -`links.pkg_info_uri` 指向的那条记录还说明了怎么校验下载的文件。`checksum_type` 是算法,摘要要么就在记录里(`checksum`),要么在厂商的一个文件里,由 `checksum_uri` 指向。GraalVM 社区版 25.0.2 只有这个文件(2026-11-02): +`links.pkg_info_uri` 指向的那条记录还说明了怎么校验下载的文件。`checksum_type` 是算法,摘要要么就在记录里(`checksum`),要么在厂商的一个文件里,由 `checksum_uri` 指向。GraalVM 社区版 25.0.2 只有这个文件(2026-11-03): ```bash curl -s 'https://api.foojay.io/disco/v3.0/packages/jdks?distribution=graalvm_community&version=25.0.2&architecture=amd64&operating_system=linux&lib_c_type=glibc&archive_type=tar.gz&directly_downloadable=true' \ @@ -176,13 +176,13 @@ Temurin 的记录里直接带着摘要(Linux x64 上的 21.0.8 是 `f2dc5418.. 文件里列了好几个包时,取正在安装的那个包的那一行。只列了别的包的文件不给出摘要:Microsoft 为 macOS 上 11.0.14 的 EA 构建发布的文件,里面写的是 GA 构建,那个摘要会让本来没问题的安装失败。 -哪些包带校验和因版本而异,有些发行版 Foojay 根本没有。各发行版最新的版本(2026-11-02): +哪些包带校验和因版本而异,有些发行版 Foojay 根本没有。各发行版最新的版本(2026-11-03): | Foojay 给出的 | 简称 | | --- | --- | | 记录里的摘要 | `tem`、`zulu`、`librca`、`nik`、`eliya`、`rdht`、25 起的 `mandrel`、最新的 `graal` 和 `graalce` | -| 厂商的一个文件 | `open`、`oracle`、`ms`、`sapmchn`、`sem`、`semcrt`、`jb`、`kona`、`ojdkbld`、`grl8`、`grl11`、`grl16`、`grl17`、`grl19`、较旧的 `graal` 和 `graalce`,以及 Corretto 8(`amzn`) | -| 没有校验和 | `albba`、`bsg`、`trava`、`adpt`、`adptj9`、`gln`、`opnlgc`、Corretto 8 以外的 `amzn`,以及其余发行版里较旧的版本 | +| 厂商的一个文件 | `open`、`oracle`、`ms`、`sapmchn`、`sem`、`semcrt`、`jb`、`kona`、`ojdkbld`、`grl8`、`grl11`、`grl16`、`grl17`、`grl19`,以及较旧的 `graal` 和 `graalce` | +| 没有校验和 | `albba`、`bsg`、`trava`、`adpt`、`adptj9`、`gln`、`opnlgc`、`amzn`,以及其余发行版里较旧的版本 | 没有校验和的包,vfox 会打印 `WARNING: Checksum is not provided, skip verify...`,下载内容照单全收。 diff --git a/docs/zh-CN/sdkmanrc.md b/docs/zh-CN/sdkmanrc.md index e2b5613..392f872 100644 --- a/docs/zh-CN/sdkmanrc.md +++ b/docs/zh-CN/sdkmanrc.md @@ -69,7 +69,7 @@ SDKMAN 在一些 Mandrel 和 Liberica NIK 的版本号里也写了 JDK 版本, SDKMAN 新写法里 `+` 后面的数字是构建号,可能是厂商的(`25.0.5.0+8-tem` 是 Temurin 的第 8 个构建,安装后叫 `25.0.5+8-tem`),也可能是 SDKMAN 自己重新构建的次数(`21.0.8+1.1-tem`)。插件先找已安装的、带这个构建号的版本,找不到再按版本匹配。Foojay 和安装后的版本名都不补零,所以 `27.0.0` 指的就是 `27`。`sdk list java` 里补一个 `.0` 很常见(`25.0.1.0+8-open`、`21.0.9.0+116386-jbr`),插件同样能读。 -Oracle GraalVM 和 GraalVM 社区版是例外。它们的版本号有五位(`25.0.5.0.3`),而 SDKMAN 的标识符在 `+` 前只有四位,所以 SDKMAN 把第五位写在 `+` 后面:`25.0.5.0+3-graal` 是 GraalVM 25.0.5.0.3,`25.4.4.1+1-graalce` 是特性版本 25.4.4.1.1。这个数字是版本号的一部分,Oracle 把 `25.0.5`、`25.0.5.0.2` 和 `25.0.5.0.3` 发布成了三个不同的文件。插件先找用点号写的已安装版本名,找不到再像对待任何没装的版本一样走第 2、3 步。`vfox install` 只认用点号写的版本名(`java@25.0.5.0.3-graal`),不认这个标识符。未发布:0.6.4 把这个数字当作 `25.0.5` 的构建号,所以 `25.0.5.0.3-graal` 旁边装着 `25.0.5-graal` 时选中后者;没装 `25.0.5-graal`、却装了更新的 25 时,选中那个更新的。 +Oracle GraalVM 和 GraalVM 社区版是例外。它们的版本号有五位(`25.0.5.0.3`),而 SDKMAN 的标识符在 `+` 前只有四位,所以 SDKMAN 把第五位写在 `+` 后面:`25.0.5.0+3-graal` 是 GraalVM 25.0.5.0.3,`25.4.4.1+1-graalce` 是特性版本 25.4.4.1.1。这个数字是版本号的一部分,Oracle 把 `25.0.5`、`25.0.5.0.2` 和 `25.0.5.0.3` 发布成了三个不同的文件。插件先找用点号写的已安装版本名,找不到再像对待任何没装的版本一样走第 2、3 步。`vfox install` 只认用点号写的版本名(`java@25.0.5.0.3-graal`),不认这个标识符。 ## 没有生效怎么办 diff --git a/docs/zh-CN/troubleshooting.md b/docs/zh-CN/troubleshooting.md index 5d8f87c..4402a7b 100644 --- a/docs/zh-CN/troubleshooting.md +++ b/docs/zh-CN/troubleshooting.md @@ -74,7 +74,7 @@ vfox config proxy.url http://127.0.0.1:7890 ## 看起来不对,其实没问题 - **`vfox search` 里没有你预期的版本。** vfox 会缓存搜索结果 12 小时。`vfox config cache.availableHookDuration 0` 可以关闭缓存。也可能是 Foojay 那边还没有这个版本。 -- **装某个 JDK 时出现 `WARNING: Checksum is not provided, skip verify...`。** Foojay 没有给这个包列出校验和(Dragonwell、Bisheng、Trava、AdoptOpenJDK、OpenLogic、Gluon GraalVM、8 以后的 Corretto,以及其余发行版里较旧的版本),vfox 没有可以拿来比对的东西,只能信任下载的内容。Foojay 给了校验和的包,vfox 会打印 `Verifying checksum <摘要>...`,见 [foojay.md](foojay.md#校验和)。 +- **装某个 JDK 时出现 `WARNING: Checksum is not provided, skip verify...`。** Foojay 没有给这个包列出校验和(Dragonwell、Bisheng、Trava、AdoptOpenJDK、OpenLogic、Gluon GraalVM、Corretto,以及其余发行版里较旧的版本),vfox 没有可以拿来比对的东西,只能信任下载的内容。Foojay 给了校验和的包,vfox 会打印 `Verifying checksum <摘要>...`,见 [foojay.md](foojay.md#校验和)。 - **安装后的版本名里多了一个你没写的构建号。** `java@21.0.8-tem` 装出来是 `21.0.8+9-tem`。构建号是版本名的一部分,见 [versions.md](versions.md#安装后的版本名)。 - **`vfox install java@21-tem` 和 `vfox install java tem` 做的是不同的事。** 后者是两个 SDK,`java` 和 `tem`。 - **你设置的 `GRAALVM_HOME` 不会被改动。** 插件只设置 `JAVA_HOME` 和 `PATH`。 From bffcde735c9c6fc1317f9a9b0dfcc78350aa8c43 Mon Sep 17 00:00:00 2001 From: Qiheng He Date: Tue, 3 Nov 2026 17:03:53 +0800 Subject: [PATCH 2/2] docs: run the container checks of native-image.md and the checksum check of e2e.md again, and say that Foojay has no CRaC builds - `docs/native-image.md` and its translation: the checks dated 2026-11-02 were run again on 2026-11-03 in Ubuntu 26.04 and Fedora 44 containers, and every statement held. The "What was checked" paragraph now also names the other GraalVM CE releases: `22.3.3-grl11`, `21.2-grl16` and `22.3.1-grl19` after `gu install native-image`, and `21.3.1-grl8` after `gu -L install` of the downloaded file. - `docs/e2e.md` and its translation: Foojay lists a checksum for the pinned release of every default distribution on every runner, compared again on 2026-11-03 (`open` and `graalce` have no Windows ARM64 build, which the suite skips). - `docs/sdkmanrc.md` and its translation: SDKMAN lists CRaC builds of Liberica and Zulu (`21.0.13.0-crac+12-librca`), which it downloads from the vendors. None of Foojay's 35,562 JDK packages is a CRaC build, so the plugin has none to install and an identifier with `crac` selects nothing. --- docs/e2e.md | 2 +- docs/native-image.md | 4 ++-- docs/sdkmanrc.md | 2 ++ docs/zh-CN/e2e.md | 2 +- docs/zh-CN/native-image.md | 4 ++-- docs/zh-CN/sdkmanrc.md | 2 ++ 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/e2e.md b/docs/e2e.md index 540d242..9073c4b 100644 --- a/docs/e2e.md +++ b/docs/e2e.md @@ -360,7 +360,7 @@ JDK, so `java` can only come from what vfox installs: The install itself must also have verified the download. Foojay lists a checksum for the pinned release of every default distribution on every - runner (2026-11-02), and `vfox install` must print `Verifying checksum + runner (2026-11-03), and `vfox install` must print `Verifying checksum ...` with a digest of a length vfox supports, not `WARNING: Checksum is not provided, skip verify...`, which every install ended with until the plugin passed Foojay's checksums on. The digests come in four diff --git a/docs/native-image.md b/docs/native-image.md index febebc1..fb33987 100644 --- a/docs/native-image.md +++ b/docs/native-image.md @@ -27,8 +27,8 @@ Other systems need other packages. GraalVM's [prerequisites](https://www.graalvm ## GraalVM CE 8 to 19 -GraalVM CE 8 to 19 (`grl8`, `grl11`, `grl16`, `grl17`, `grl19`) come without `native-image`. Their `bin` directory holds `gu`, the GraalVM Updater, and `native-image` is `command not found` until `gu install native-image` has added it from GitHub. That worked for `22.3.3-grl11`, `21.2-grl16`, `22.3.3-grl17` and `22.3.1-grl19` on 2026-11-02, and the packages above are needed after it as before. It failed for `21.3.1-grl8` with `Internal error occurred: A JSONObject text must begin with '{'`, because the release index that this `gu` downloads, `https://oca.opensource.oracle.com/gds/meta-data.json`, is a web page now. For that release, download `native-image-installable-svm-java8-linux-amd64-21.3.1.jar` from the [`vm-21.3.1` release](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.3.1) and run `gu -L install` on the file. +GraalVM CE 8 to 19 (`grl8`, `grl11`, `grl16`, `grl17`, `grl19`) come without `native-image`. Their `bin` directory holds `gu`, the GraalVM Updater, and `native-image` is `command not found` until `gu install native-image` has added it from GitHub. That worked for `22.3.3-grl11`, `21.2-grl16`, `22.3.3-grl17` and `22.3.1-grl19` on 2026-11-03, and the packages above are needed after it as before. It failed for `21.3.1-grl8` with `Internal error occurred: A JSONObject text must begin with '{'`, because the release index that this `gu` downloads, `https://oca.opensource.oracle.com/gds/meta-data.json`, is a web page now. For that release, download `native-image-installable-svm-java8-linux-amd64-21.3.1.jar` from the [`vm-21.3.1` release](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.3.1) and run `gu -L install` on the file. ## What was checked -Checked on 2026-11-02 with vfox 1.0.13 in Ubuntu 26.04 container images (x64) that had no compiler. GraalVM Community 25.0.2 and 25.4.4.1.1, Oracle GraalVM 25.0.5, Mandrel 25.0.5, Liberica NIK 25.0.4.1 and Gluon GraalVM 22.1.0.1 stopped as described without the packages, and with them built a hello world that ran. So did `22.3.3-grl17` after `gu install native-image`, and GraalVM Community 25.0.2 in a Fedora 44 image. +Checked on 2026-11-03 with vfox 1.0.13 in Ubuntu 26.04 container images (x64) that had no compiler. GraalVM Community 25.0.2 and 25.4.4.1.1, Oracle GraalVM 25.0.5, Mandrel 25.0.5, Liberica NIK 25.0.4.1 and Gluon GraalVM 22.1.0.1 stopped as described without the packages, and with them built a hello world that ran. So did `22.3.3-grl11`, `21.2-grl16`, `22.3.3-grl17` and `22.3.1-grl19` after `gu install native-image`, `21.3.1-grl8` after `gu -L install` of the downloaded file, and GraalVM Community 25.0.2 in a Fedora 44 image. diff --git a/docs/sdkmanrc.md b/docs/sdkmanrc.md index 150d28f..bf6a7a3 100644 --- a/docs/sdkmanrc.md +++ b/docs/sdkmanrc.md @@ -67,6 +67,8 @@ The last three rows are SDKMAN's identifiers for distributions it no longer list SDKMAN writes the JDK into some versions of Mandrel and Liberica NIK as well, which the plugin names after the GraalVM version alone, see [distributions.md](distributions.md#behavior-of-mandrel-and-liberica-nik). Of a release that comes for two JDKs, the plugin installs only the build for the newer one, so an identifier with the older one selects nothing: `22.1.r11-mandrel`, `23.0.1.r17-nik`. The older JDK is 11 from 21.3 to 22.3.5 and 17 from 23 to 23.0.1.2. `25.r25-mandrel` has only the major and selects the newest installed Mandrel 25, as `java=25-mandrel` does, while SDKMAN installs 25.0.1.0 for it. +SDKMAN also lists CRaC builds of Liberica and Zulu (`21.0.13.0-crac+12-librca`, `25.0.4.1-crac+1-zulu`) and downloads them from the vendors. Foojay lists no CRaC build, so the plugin has none to install, and an identifier with `crac` selects nothing. + The number after `+` in SDKMAN's newer identifiers is a build number, the vendor's (`25.0.5.0+8-tem` is Temurin's build 8, installed as `25.0.5+8-tem`) or SDKMAN's own count of its rebuilds (`21.0.8+1.1-tem`). The plugin looks for an installed build of that number first and otherwise takes the release. Foojay, and so the installed name, has no zero padding, which is why `27.0.0` means the release `27`. A `.0` padding in `sdk list java` is common (`25.0.1.0+8-open`, `21.0.9.0+116386-jbr`), and the plugin reads it as well. Oracle GraalVM and GraalVM Community are the exception. Their versions have five numbers (`25.0.5.0.3`) where SDKMAN's identifiers have four before the `+`, so SDKMAN writes the fifth after it: `25.0.5.0+3-graal` is GraalVM 25.0.5.0.3, and `25.4.4.1+1-graalce` is the feature release 25.4.4.1.1. That number belongs to the release. Oracle ships `25.0.5`, `25.0.5.0.2` and `25.0.5.0.3` as three different files. The plugin looks for the installed name with the dot first, and failing that goes on with steps 2 and 3 as for any release that is not installed. `vfox install` takes the dotted name only (`java@25.0.5.0.3-graal`), not the identifier. diff --git a/docs/zh-CN/e2e.md b/docs/zh-CN/e2e.md index 0260989..960948b 100644 --- a/docs/zh-CN/e2e.md +++ b/docs/zh-CN/e2e.md @@ -193,7 +193,7 @@ docker run --rm -v "$PWD:/src" ghcr.io/google/addlicense:v1.2.0 -f .license.tpl 在 Linux 上,这几行和第 3 条的 `graalce` 行经由一个冒充 api.foojay.io 的替身访问 Foojay(由 `tests/e2e/linux/front` 构建),替身记下插件发出的每个请求。上面每次安装发的请求都必须和它前面那次搜索的相同(`tests/e2e/common` 里的 `AsksAsSearch`)。Foojay 的结果按请求分别缓存,新版本发布后的半小时里,换一个请求就可能装上搜索还没列出的构建,于是真的下载,检查失败(见 [foojay.md](foojay.md#插件发出的请求))。[#113](https://github.com/version-fox/vfox-java/issues/113) 之前,只写大版本号时查的是 `latest=available`,Mandrel 和 Liberica NIK 则按 `distribution_version` 查。 5. 固定的版本按 `PreInstall` 给它起的名字安装:请求的版本加上构建号(`21.0.8-tem` 安装为 `21.0.8+9-tem`)。`vfox search java <发行版>`(`Available` 钩子)把同一个名字列为已安装,带 JavaFX 的构建会标注 JavaFX。对 GraalVM,它还必须列出自 25.1 起每月发布的特性版本(`25.4.4.1.1-graalce`),这些版本都不标 LTS(Foojay 给其中一些标了,因为它们基于的 JDK 是 LTS);每个版本大约只存在一个月。同一个大版本里的其他版本,备注必须一致。插件以前把特性版本 25.4.4.1.1 列成 `25.0.4.1-graalce`,没有 `25.0.2-graalce` 那样的 LTS 备注。在 Windows 上,列表里要包含 JetBrains Runtime 21.0.5,它在 Windows 上只有 tar.gz。 - 安装本身还必须校验了下载的文件。每个默认发行版固定的版本,Foojay 在每个 runner 上都给出了校验和(2026-11-02),`vfox install` 必须打印 `Verifying checksum <摘要>...`,摘要的长度是 vfox 支持的,并且不能出现 `WARNING: Checksum is not provided, skip verify...`——在插件把 Foojay 的校验和交给 vfox 之前,每次安装最后都有这条警告。摘要有四种形式,所以插件读取它们的每种方式都会跑到:Foojay 记录里的 SHA-256 和 SHA-1(Temurin、Liberica),只有摘要的文件里的 SHA-256(OpenJDK、GraalVM 社区版),以及带着文件名的文件里的 SHA-512(JetBrains)。vfox 把摘要和下载文件的哈希值比较,对不上就让安装失败,所以安装成功就证明摘要确实是这个文件的。用 `JAVA_VERSION` 指定的版本不检查这一项,因为 Foojay 可能没有它的校验和。 + 安装本身还必须校验了下载的文件。每个默认发行版固定的版本,Foojay 在每个 runner 上都给出了校验和(2026-11-03),`vfox install` 必须打印 `Verifying checksum <摘要>...`,摘要的长度是 vfox 支持的,并且不能出现 `WARNING: Checksum is not provided, skip verify...`——在插件把 Foojay 的校验和交给 vfox 之前,每次安装最后都有这条警告。摘要有四种形式,所以插件读取它们的每种方式都会跑到:Foojay 记录里的 SHA-256 和 SHA-1(Temurin、Liberica),只有摘要的文件里的 SHA-256(OpenJDK、GraalVM 社区版),以及带着文件名的文件里的 SHA-512(JetBrains)。vfox 把摘要和下载文件的哈希值比较,对不上就让安装失败,所以安装成功就证明摘要确实是这个文件的。用 `JAVA_VERSION` 指定的版本不检查这一项,因为 Foojay 可能没有它的校验和。 6. 在执行任何 `vfox use` 之前,`.sdkmanrc` 要能通过 `ParseLegacyFile` 选中 JDK。测试时,`vfox list java` 里排在最前面的是另一个版本的空安装(`21.0.80+1-tem`,它的版本号以固定的版本开头;vfox 按字符串降序给已安装版本排序)。以前 `ParseLegacyFile` 会把它当成第一个以该版本开头的版本,对补零的版本(见下面第二条),则当成该大版本里最新的版本。要覆盖的写法有: - 不含构建号的 SDKMAN 标识符:`java=21.0.8-tem`、`java=21.0.5-jbr`(SDKMAN 对 JetBrains 的叫法)、`java=25.0.4.fx-librca`(它对 JavaFX 构建的写法)。 - 补零的标识符,`sdk list java` 里有很多这样的:`java=21.0.8.0+9-tem`、`java=25.0.4.0-fx+9-librca`(Foojay 以及安装后的版本名里没有这个零)。 diff --git a/docs/zh-CN/native-image.md b/docs/zh-CN/native-image.md index 32cad04..36dd912 100644 --- a/docs/zh-CN/native-image.md +++ b/docs/zh-CN/native-image.md @@ -27,8 +27,8 @@ sudo apt install --assume-yes build-essential zlib1g-dev ## GraalVM CE 8 到 19 -GraalVM CE 8 到 19(`grl8`、`grl11`、`grl16`、`grl17`、`grl19`)不带 `native-image`。它们的 `bin` 目录里只有 GraalVM 更新器 `gu`,`native-image` 会报 `command not found`,要先用 `gu install native-image` 从 GitHub 添加。2026-11-02 这在 `22.3.3-grl11`、`21.2-grl16`、`22.3.3-grl17` 和 `22.3.1-grl19` 上成功了,添加之后仍然需要上面的包。`21.3.1-grl8` 上失败了,报 `Internal error occurred: A JSONObject text must begin with '{'`:这个 `gu` 下载的版本索引 `https://oca.opensource.oracle.com/gds/meta-data.json` 现在返回的是一个网页。对这个版本,请从 [`vm-21.3.1` 发布页](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.3.1)下载 `native-image-installable-svm-java8-linux-amd64-21.3.1.jar`,再对这个文件执行 `gu -L install`。 +GraalVM CE 8 到 19(`grl8`、`grl11`、`grl16`、`grl17`、`grl19`)不带 `native-image`。它们的 `bin` 目录里只有 GraalVM 更新器 `gu`,`native-image` 会报 `command not found`,要先用 `gu install native-image` 从 GitHub 添加。2026-11-03 这在 `22.3.3-grl11`、`21.2-grl16`、`22.3.3-grl17` 和 `22.3.1-grl19` 上成功了,添加之后仍然需要上面的包。`21.3.1-grl8` 上失败了,报 `Internal error occurred: A JSONObject text must begin with '{'`:这个 `gu` 下载的版本索引 `https://oca.opensource.oracle.com/gds/meta-data.json` 现在返回的是一个网页。对这个版本,请从 [`vm-21.3.1` 发布页](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.3.1)下载 `native-image-installable-svm-java8-linux-amd64-21.3.1.jar`,再对这个文件执行 `gu -L install`。 ## 检查过的环境 -2026-11-02 用 vfox 1.0.13 在没有编译器的 Ubuntu 26.04 容器镜像(x64)里检查过:GraalVM 社区版 25.0.2 和 25.4.4.1.1、Oracle GraalVM 25.0.5、Mandrel 25.0.5、Liberica NIK 25.0.4.1 和 Gluon GraalVM 22.1.0.1,没有这些包时都如上所述停下,装上之后都构建出了能运行的 hello world。`22.3.3-grl17` 在执行 `gu install native-image` 之后也是如此,GraalVM 社区版 25.0.2 在 Fedora 44 的镜像里也一样。 +2026-11-03 用 vfox 1.0.13 在没有编译器的 Ubuntu 26.04 容器镜像(x64)里检查过:GraalVM 社区版 25.0.2 和 25.4.4.1.1、Oracle GraalVM 25.0.5、Mandrel 25.0.5、Liberica NIK 25.0.4.1 和 Gluon GraalVM 22.1.0.1,没有这些包时都如上所述停下,装上之后都构建出了能运行的 hello world。`22.3.3-grl11`、`21.2-grl16`、`22.3.3-grl17` 和 `22.3.1-grl19` 在执行 `gu install native-image` 之后、`21.3.1-grl8` 在对下载的文件执行 `gu -L install` 之后也是如此,GraalVM 社区版 25.0.2 在 Fedora 44 的镜像里也一样。 diff --git a/docs/zh-CN/sdkmanrc.md b/docs/zh-CN/sdkmanrc.md index 392f872..05995ad 100644 --- a/docs/zh-CN/sdkmanrc.md +++ b/docs/zh-CN/sdkmanrc.md @@ -67,6 +67,8 @@ vfox 挂载到 Shell 之后,进入目录时会读取这个文件,并选中 SDKMAN 在一些 Mandrel 和 Liberica NIK 的版本号里也写了 JDK 版本,而插件只按 GraalVM 版本号给它们命名,见 [distributions.md](distributions.md#mandrel-与-liberica-nik-的行为)。一个版本同时为两个 JDK 发布时,插件只装较新 JDK 的构建,所以写了较旧 JDK 的标识符什么都不会选中:`22.1.r11-mandrel`、`23.0.1.r17-nik`。较旧的 JDK,在 21.3 到 22.3.5 是 JDK 11,在 23 到 23.0.1.2 是 JDK 17。`25.r25-mandrel` 只写了大版本号,会选中已安装的最新 Mandrel 25,和 `java=25-mandrel` 一样,而 SDKMAN 按这个标识符装的是 25.0.1.0。 +SDKMAN 还列出了 Liberica 和 Zulu 的 CRaC 构建(`21.0.13.0-crac+12-librca`、`25.0.4.1-crac+1-zulu`),并直接从厂商下载。Foojay 没有列出任何 CRaC 构建,所以插件没有 CRaC 构建可装,带 `crac` 的标识符什么也选不中。 + SDKMAN 新写法里 `+` 后面的数字是构建号,可能是厂商的(`25.0.5.0+8-tem` 是 Temurin 的第 8 个构建,安装后叫 `25.0.5+8-tem`),也可能是 SDKMAN 自己重新构建的次数(`21.0.8+1.1-tem`)。插件先找已安装的、带这个构建号的版本,找不到再按版本匹配。Foojay 和安装后的版本名都不补零,所以 `27.0.0` 指的就是 `27`。`sdk list java` 里补一个 `.0` 很常见(`25.0.1.0+8-open`、`21.0.9.0+116386-jbr`),插件同样能读。 Oracle GraalVM 和 GraalVM 社区版是例外。它们的版本号有五位(`25.0.5.0.3`),而 SDKMAN 的标识符在 `+` 前只有四位,所以 SDKMAN 把第五位写在 `+` 后面:`25.0.5.0+3-graal` 是 GraalVM 25.0.5.0.3,`25.4.4.1+1-graalce` 是特性版本 25.4.4.1.1。这个数字是版本号的一部分,Oracle 把 `25.0.5`、`25.0.5.0.2` 和 `25.0.5.0.3` 发布成了三个不同的文件。插件先找用点号写的已安装版本名,找不到再像对待任何没装的版本一样走第 2、3 步。`vfox install` 只认用点号写的版本名(`java@25.0.5.0.3-graal`),不认这个标识符。