You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 01843ef
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/changes.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,11 @@
2
2
3
3
[中文](zh-CN/changes.md) | [English](changes.md)
4
4
5
-
What changed in each release, as a user notices it. GitHub's release pages list the pull requests.
5
+
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.
6
+
7
+
## Unreleased
8
+
9
+
- 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)).
Copy file name to clipboardExpand all lines: docs/development.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ A few contracts that cost time to find:
53
53
54
54
Installed names are `<java_version>[-<short name>][-fx]`, with no short name for OpenJDK, Foojay's `distribution_version` in place of `java_version` for Mandrel and Liberica NIK, and GraalVM's own version for `graal` and `graalce` ([versions.md](versions.md#installed-names)). `lib/distribution_version.lua` reads a spec into a version, a distribution and the JavaFX flag, in either order (`21-tem`, `tem-21`). `lib/installed_version.lua` turns a version the user typed into an installed name: the name itself first. A bare major then takes the newest installed release of it, and any other version takes the release itself or its newest build. `PreUse` stops there. `ParseLegacyFile` goes one step further and falls back to the newest installed release of the major. Both leave out Oracle GraalVM's feature releases when they take the newest release of a major, unless nothing else of it is installed (`bare_major_skips`, see below).
55
55
56
-
SDKMAN spells some things differently (`jbr`, `21.0.12.fx-zulu`, `21.0.12-fx+1.1-librca`, `28.0.0+ea.19-open`), and `plugin_spelling` in `hooks/parse_legacy_file.lua` rewrites them into the plugin's before parsing. For the distributions SDKMAN no longer lists, `sdkman_flavours` there turns the virtual machine or JDK in SDKMAN's version into the short name (`22.3.3.r17-grl` is `22.3.3-grl17`). For Mandrel and Liberica NIK (`sdkman_jdks`) the JDK is dropped (`25.0.4.r25-nik` is `25.0.4-nik`). An identifier with the older JDK of a release that comes for two, which `older_jdk` returns, selects nothing (`22.1.r11-mandrel`). `installed_version.unpad` drops the zeros SDKMAN pads releases with (`27.0.0+36` is `27+36`). Where the short names differ from SDKMAN's is in [distributions.md](distributions.md#short-names-and-sdkman).
56
+
SDKMAN spells some things differently (`jbr`, `21.0.12.fx-zulu`, `21.0.12-fx+1.1-librca`, `28.0.0+ea.19-open`), and `plugin_spelling` in `hooks/parse_legacy_file.lua` rewrites them into the plugin's before parsing. For the distributions SDKMAN no longer lists, `sdkman_flavours` there turns the virtual machine or JDK in SDKMAN's version into the short name (`22.3.3.r17-grl` is `22.3.3-grl17`). For Mandrel and Liberica NIK (`sdkman_jdks`) the JDK is dropped (`25.0.4.r25-nik` is `25.0.4-nik`). An identifier with the older JDK of a release that comes for two, which `older_jdk` returns, selects nothing (`22.1.r11-mandrel`). `installed_version.unpad` drops the zeros SDKMAN pads releases with (`27.0.0+36` is `27+36`). In the identifiers of Oracle GraalVM and GraalVM Community (`sdkman_graalvm`) the number after the `+` is the fifth number of GraalVM's version and no build, so `ParseLegacyFile` looks for the installed name with a dot before the others (`25.0.5.0+3-graal` is `25.0.5.0.3-graal`). Where the short names differ from SDKMAN's is in [distributions.md](distributions.md#short-names-and-sdkman).
57
57
58
58
## Foojay
59
59
@@ -67,7 +67,7 @@ SDKMAN spells some things differently (`jbr`, `21.0.12.fx-zulu`, `21.0.12-fx+1.1
67
67
- The package's record (`links.pkg_info_uri`) holds `checksum_type` and either `checksum` or `checksum_uri`. `checksum.lookup` in `lib/checksum.lua` takes the digest of the record first, which also costs no request, and fetches the file only where the record has none. `PreInstall` hands it the function that fetches, which sends a GitHub address through `$VFOX_JAVA_GITHUB_MIRROR`, so the library needs no `http` and the tests need no stub for it. A file that lists other packages only gives none, because the digest of another file would fail an install that is fine: Microsoft's file for its EA build of 11.0.14 for macOS names the GA build.
68
68
-`Available` lists a name once where Foojay has two records for it.
69
69
- Foojay marks GraalVM Community's monthly feature releases (`25.1.3` and on) as LTS where it lists them the old way round, as it did Oracle GraalVM's. `is_feature_release` in `lib/distribution_version.lua` recognises them, by the minor number, and `Available` drops the note. It is for `graal` and `graalce` only: Mandrel and Liberica NIK carry GraalVM's older numbers up to 24, whose minor is no feature release (`mandrel``23.1.12` is LTS), and the JDK's from 25 on.
70
-
- For a bare major of Oracle GraalVM (`graal`) only, `PreInstall` skips the feature releases, so the 25.0 line is installed. A major that has nothing but feature releases keeps them. GraalVM Community is not filtered, because its feature releases are what it still ships. `bare_major_skips` in `lib/distribution_version.lua` holds that rule. `PreUse` and `ParseLegacyFile` apply it to the installed versions as well, so that `vfox use` and a `.sdkmanrc` select the build `PreInstall` installs: the newest installed release of the major that is no feature release, else the newest feature release. `ParseLegacyFile` applies it to the fallback for a release that is not installed too, except when the file names a feature release (`25.4.4+1-graal`, as SDKMAN spells one), which takes the newest release of the major as before.
70
+
- For a bare major of Oracle GraalVM (`graal`) only, `PreInstall` skips the feature releases, so the 25.0 line is installed. A major that has nothing but feature releases keeps them. GraalVM Community is not filtered, because its feature releases are what it still ships. `bare_major_skips` in `lib/distribution_version.lua` holds that rule. `PreUse` and `ParseLegacyFile` apply it to the installed versions as well, so that `vfox use` and a `.sdkmanrc` select the build `PreInstall` installs: the newest installed release of the major that is no feature release, else the newest feature release. `ParseLegacyFile` applies it to the fallback for a release that is not installed too, except when the file names a feature release (`25.4.4.1+1-graal`, as SDKMAN spells one, or `25.4.4+1-graal`), which takes the newest release of the major as before.
71
71
- The CPU names are `arm64` to `aarch64`, and on Windows `amd64` to `x64`. `darwin` becomes `macos`. On Linux `ldd --version` decides between glibc and musl.
Copy file name to clipboardExpand all lines: docs/sdkmanrc.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,13 @@ vfox's shell hook reads the file when you enter the directory and selects the JD
34
34
35
35
The plugin matches the identifier against the JDKs that are installed, in this order:
36
36
37
-
1. An installed name written as it is: `java=21.0.8+9-tem`, `java=28-ea+19`.
37
+
1. An installed name written as it is: `java=21.0.8+9-tem`, `java=28-ea+19`. For Oracle GraalVM and GraalVM Community the number after the `+` is the fifth number of the version, so `java=25.0.5.0+3-graal` names `25.0.5.0.3-graal`, see [SDKMAN's spellings](#sdkmans-spellings).
38
38
2. The release you named, with its newest installed build: `21.0.8-tem` selects `21.0.8+9-tem`.
39
39
3. Failing that, the newest installed release of the same major. `21-tem` goes straight to this step.
40
40
41
41
Step 3 does not check that the release is at least the one named. With only `21.0.8+9-tem` installed, `java=21.0.12-tem` selects it, and so does `java=21.0.3-tem`. A build number that is not installed falls back to the newest installed build of the release (`21.0.8+7-tem` selects `21.0.8+9-tem`). If the major is not installed at all, nothing is selected.
42
42
43
-
For Oracle GraalVM, step 3 leaves out the monthly feature releases (`25.4.4.1.1-graal`), as `vfox use java@25-graal` does, so `java=25-graal` and `java=25.0.3-graal` select the newest installed build of the 25.0 line. If nothing else of 25 is installed, a feature release is taken. If the file names a feature release (SDKMAN spells one `25.4.4+1-graal`), the newest installed release of 25 is taken.
43
+
For Oracle GraalVM, step 3 leaves out the monthly feature releases (`25.4.4.1.1-graal`), as `vfox use java@25-graal` does, so `java=25-graal` and `java=25.0.3-graal` select the newest installed build of the 25.0 line. If nothing else of 25 is installed, a feature release is taken. If the file names a feature release that is not installed (SDKMAN has spelled one`25.4.4.1+1-graal` and`25.4.4+1-graal`), the newest installed release of 25 is taken.
44
44
45
45
It never crosses to another distribution, between a JavaFX build and a plain one, or between an early-access build and a release.
46
46
@@ -56,6 +56,7 @@ It never crosses to another distribution, between a JavaFX build and a plain one
56
56
|`21.0.12-fx+1.1-librca`| Liberica with JavaFX (newer spelling) |
57
57
|`21.0.8+1.1-tem`| Temurin 21.0.8, see below |
58
58
|`27.0.0+36-librca`, `25.0.1.0+8-open`|`27+36-librca`, `25.0.1+8`: the zeros are dropped |
59
+
|`25.0.5.0+3-graal`, `25.4.4.1+1-graalce`|`25.0.5.0.3-graal`, `25.4.4.1.1-graalce`: the number after the `+` is the fifth number of GraalVM's version |
59
60
|`28.ea.19-open`, `28.0.0+ea.19-open`| the early-access build `28-ea+19`|
60
61
|`25.0.4.r25-nik`, `25.0.2.r25-mandrel`|`25.0.4-nik`, `25.0.2-mandrel`: `.r` and the JDK after it are dropped |
61
62
|`11.0.10.hs-adpt`, `11.0.10.j9-adpt`| AdoptOpenJDK with HotSpot, `11.0.10-adpt`, and with OpenJ9, `11.0.10-adptj9`|
@@ -66,7 +67,9 @@ The last three rows are SDKMAN's identifiers for distributions it no longer list
66
67
67
68
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.
68
69
69
-
The number after `+` in SDKMAN's newer identifiers (`21.0.8+1.1-tem`) counts SDKMAN's own rebuilds. It is not a build number of the vendor, so the plugin does not look for one and 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.
70
+
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.
71
+
72
+
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.
0 commit comments