Skip to content

[BUG]: .sdkmanrc with SDKMAN's early-access spelling 28.0.0+ea.19-open does not select the installed 28-ea+19 #86

Closed

Description

@linghengqian

Version
vfox-java main (00ced99), vfox 1.0.13

OS
Linux

Describe the bug
SDKMAN's new version scheme writes an early-access build as <major>.0.0+ea.<build> where the old one wrote <major>.ea.<build>:
https://github.com/sdkman/sdkman-state/blob/85e1065c0c3300fa906491aee5a61aafca391bb8/specs/semverish-version-validation.md?plain=1#L72

sdk list java shows OpenJDK's as 28.0.0.0+ea.20-open today, padded to four numbers like many GA identifiers (#80). With 28-ea+19 installed (vfox install java@28.ea.19; Foojay lists builds up to 19 so far) and nothing set globally, a directory whose .sdkmanrc has:

.sdkmanrc                    selected
java=28.ea.19-open           28-ea+19
java=28.0.0+ea.19-open       nothing (bash: java: command not found)
java=28.0.0.0+ea.19-open     nothing (bash: java: command not found)

ParseLegacyFile turns only the old spelling into Foojay's 28-ea+19:

function distribution_version.convert_version_for_api(version)
-- Handle EA version format: "X.ea.Y" -> "X-ea+Y"
local ea_version, ea_build = version:match("^(%d+)%.ea%.(%d+)$")
if ea_version and ea_build then
return ea_version .. "-ea+" .. ea_build
end
-- Handle EA version format without build number: "X.ea" -> "X-ea"
local ea_version_only = version:match("^(%d+)%.ea$")
if ea_version_only then
return ea_version_only .. "-ea"
end
-- Return as-is for normal versions
return version
end

The new one stays 28.0.0.0+ea.19, whose release no installed name starts with, and the fallback to the major skips EA builds:

--- The version itself (21.0.5+63130-jb), else the newest build of the
--- release, as SDKMAN's build numbers count its own rebuilds
--- (21.0.12+1.1-tem), else the newest installed release of the major
--- (21.0.12+8-tem for 21.0.3-tem).
local name = fullVersion .. suffix
return {
version = installed[name] and name
or installed_version.find(installed, version, suffix)
or installed_version.newest(installed, majorVersion .. ".", "^[%d.+]*$", suffix),
}

#85 drops the trailing .0 components for #80 but leaves 28+ea.19, which still matches nothing. Rewriting SDKMAN's +ea.<build> into the plugin's EA spelling (28.0.0+ea.19 to 28.ea.19, that is 28-ea+19) before matching would line these up.

Found while working on #80.

Activity

  1. linghengqian commented on Oct 17, 2026

    @linghengqian
    MemberAuthor
    • I am working on the current issue.
  2. self-assigned this
    on Oct 17, 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