Skip to content

[BUG]: vfox install java@25-graal installs the GraalVM feature release 25.4.4.1-graal instead of the newest 25.0 LTS build #97

Closed

Description

@linghengqian

Version
vfox-java main (3b38e44), vfox 1.0.13

OS
Linux

Describe the bug
Since #74, a bare major installs the newest release of that major. For Oracle GraalVM 25 that is now a monthly feature release rather than a build of the 25.0 LTS line:

$ vfox install java@25-graal
Preinstalling java@25.4.4.1-graal...
Verifying checksum ...
WARNING: Checksum is not provided, skip verify...
Unpacking ~/.vfox/cache/java/graalvm-jdk-25i4-25.0.4.1.1_linux-x64_bin.tar.gz...
Install java@25.4.4.1-graal success!
Please use `vfox use java@25.4.4.1-graal` to use it.
$ vfox use --global java@25-graal
Now using java@25.4.4.1-graal.
$ java -version
java version "25.0.4.1.1" 2026-08-18 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 25.4.4.1.1+1.1 (build 25.0.4.1.1+1-LTS-jvmci-25.4-b23)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 25.4.4.1.1+1.1 (build 25.0.4.1.1+1-LTS-jvmci-25.4-b23, mixed mode, sharing)

java -version says LTS because the JDK underneath is 25.0.4.1.1, but the GraalVM release on top is 25.4, a feature release. v0.6.1 installs GA 25-graal instead. With latest=available, Foojay lists the feature releases first for version=25&distribution=graalvm (25.4.4.1, 25.3.4.1, 25.2.4, 25.1.3, 25.0.4.1, 25.0.4 on linux x64), and PreInstall takes the first one:

vfox-java/lib/foojay.lua

Lines 74 to 77 in 3b38e44

-- A bare major such as 21 matches only its GA build (21+35); latest=available
-- picks the newest 21.x instead. Longer versions keep matching exactly, as
-- latest=available would look at the major alone.
local latest = version:match("^%d+$") and "&latest=available" or ""

local jdk = filtered_jdks[1]

Oracle's own tools read "GraalVM 25" as the 25.0 line. https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-x64_bin.tar.gz is 25.0.4 (its .sha256 is the same as for 25/archive/graalvm-jdk-25.0.4_linux-x64_bin.tar.gz), and graalvm/setup-graalvm downloads that URL for java-version: '25':
https://github.com/graalvm/setup-graalvm/blob/f652a0efa63e76b0a69eac38011d6e27fbf7e1bf/src/graalvm.ts#L210

There, a feature release has to be asked for with version: '25.4' or 25i-latest:
https://github.com/graalvm/setup-graalvm/blob/f652a0efa63e76b0a69eac38011d6e27fbf7e1bf/README.md?plain=1#L214

Feature releases come out every month and each one supersedes the previous one (https://www.graalvm.org/release-calendar/), so anyone who installs 25-graal, a CI job for example, leaves the LTS line and gets a different feature release every month. For graal, skipping the packages whose second component is non-zero, the same check #95 needs, would make 25-graal take 25.0.4.1, the newest 25.0 build Foojay lists.

25-graalce takes 25.4.4.1-graalce too, but the 25.0 line of GraalVM Community Edition ended with 25.0.2 in January 2026, so for it the feature releases are the only ones still updated. This issue is about graal only.

Found while working on #64.

Activity

  1. linghengqian commented on Oct 18, 2026

    @linghengqian
    MemberAuthor
    • I am working on the current issue.
  2. self-assigned this
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions