Repository navigation
fix: make .sdkmanrc with SDKMAN's Oracle GraalVM and GraalVM Community identifiers, such as java=25.0.5.0+3-graal, select the build they name - #124
Merged
Conversation
…ity identifiers, such as `java=25.0.5.0+3-graal`, select the build they name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDKMAN writes the fifth number of GraalVM's version after the
+:sdk list javashows Oracle GraalVM as25.0.5.0+3-graaland25.4.4.1+1-graal, GraalVM Community as25.4.4.1+1-graalce. SDKMAN's own download shows what the number is:https://broker.sdkman.io/download/java/25.0.5.0+3-graal/linuxx64redirects togds.oracle.com/api/20220101/artifacts/D31F8D13975942E3993AA792B3944F9F/content, which is the file Foojay lists as GraalVM25.0.5.0.3(graalvm-jdk-25.0.5.0.3_linux-x64_bin.tar.gz), a different download than25.0.5and25.0.5.0.2(three artifacts, three sha256, alljava_version25.0.5).25.4.4.1+1-graaland25.4.4+1-graal, the spelling the docs and tests had, both redirect to the artifact of 25.4.4.1.1.ParseLegacyFileread that number as a build of the release 25.0.5, looked for the installed name25.0.5+3-graal, which GraalVM never has, and fell back to the release25.0.5-graalor the newest installed release of the major. So:java=25.0.5.0+3-graalselected25.0.5-graalwhen that is installed next to25.0.5.0.3-graal. Both are installed by anyone who ranvfox install java@25-graalon 2026-10-20 and again now.25.0.5-graal, a project pinned to25.0.5.0+3-graalmoved to the newer one, andjava=25.0.5.0+2-graalselected25.0.5.0.3-graalover the installed25.0.5.0.2-graal.+8is the vendor's build (25.0.5.0+8-temredirects to Temurin'sjdk-25.0.5+8), and the plugin looks for the installed25.0.5+8-temfirst, so a pinned build is kept there.Change
hooks/parse_legacy_file.lua: forgraalandgraalce(sdkman_graalvm), an identifierA.B.C.D+Nfirst looks for the installed nameA.B.C.D.N(without trailing zeros, like the other names). Failing that it goes on as before: the name with the+, the release, the newest installed release of the major, with Oracle GraalVM's feature releases last.tests/parse_legacy_file_test.lua: 12 cases. The ones above,java=25.4.4.1+1-graaland-graalcenext to a newer release, a build that is not installed (25.0.5-graalnext to25.0.6-graal,25.0.5.0.2-graal, only a feature release), no crossing tograalce, and the Temurin build as the contrast.25.4.4+1-graal, the older spelling, stays a case: it matches no installed name and takes the newest release of 25 as before.vfox search java graallists and the suite fakes as installed, a.sdkmanrcholding SDKMAN's identifier of each one with five numbers (GraalVMIdentifiersintests/e2e/common, with a unit test) must select that build.curl ... | bashwithoutpipefail, so a failed download passed as an install and the next step died withvfox: command not found. I hit it on the first run. It ispipefailand a retry now, like the other downloads.sdkmanrc.md(the sentence that called the number after the+SDKMAN's own rebuild count, and said the plugin does not look for a build, is narrowed: Temurin's+8is the vendor's build and the plugin looks for it first; the new GraalVM paragraph and table row; the feature release spelled both ways),development.md,e2e.mdandchanges.md(Unreleased).Verification
The new cases fail on the old hook and pass on the new one.
vfox plugin test .(vfox 1.0.13) passes: 115ParseLegacyFilecases (103 before), 90PreUse, 116PreInstall, and the rest.Real vfox 1.0.13 with faked installs and a
.sdkmanrcread byvfox env:.sdkmanrc25.0.5.0+3-graal25.0.5.0.3,25.0.525.0.5-graal25.0.5.0.3-graal25.0.5.0+2-graal.2,.3,25.0.525.0.5-graal25.0.5.0.2-graal25.0.5.0+3-graal.2,.3,25.0.5,25.0.625.0.5-graal25.0.5.0.3-graal25.4.4.1+1-graal25.4.4.1.125.4.4.1.1-graal25.4.4.1.1-graal25.0.5.0+8-tem25.0.5+8-tem,25.0.6+7-tem25.0.5+8-tem25.0.5+8-temtests/e2e/linuxwith vfox 1.0.13 forgraalce(linux/amd64): passes, with.sdkmanrc java=25.0.5.0+3-graal selects 25.0.5.0.3-graal,25.0.5.0+2-graal,25.0.4.1+1-graaland25.4.4.1+1-graal. Against the old hook the same run fails there: expected25.0.5.0.3-graal, actual25.0.5-graal.stylua --check .(2.5.2) andlua-language-server --check . --checklevel=Warning(3.19.1), the versions of the Lint workflow, pass. So dogofmt,go vet(also withGOOS=windows) andgo test -shortintests/e2e.vfox install java@25.0.5.0+3-graalstill fails withNo JDK found, as the docs say of.sdkmanrcidentifiers that are not install specs;java@25.0.5.0.3-graalstarts downloading.Not run locally: the Windows and Linux arm64 e2e jobs and the other distributions' rows.
Notes
java=25.0.5.0+3-graalwith only25.0.5.0.2-graaland25.0.6-graal) still takes the newest release of 25, as the docs describe for any release that is not installed. Taking the other builds of 25.0.5 first would be a separate change.