Repository navigation
Fix Liberica SDKMAN patch release resolution - #1291
brunoborges wants to merge 1 commit into
Conversation
Preserve BellSoft's fourth version component as SDKMAN patch metadata and cover real API version formats for Java 17 and 25. Fixes actions#1290 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d5b53868-538f-4c5f-b2aa-c66dc4ad06e2
|
@mhalbritter Thanks for confirming that the bug was still present. This PR fixes the patch/build mapping using the real BellSoft API version format. Could you test this commit in your workflow? - uses: brunoborges/setup-java@8b3a6bb4a190f2b5a4669e90270ae92647ed0516
with:
java-version-file: .sdkmanrcKeep |
There was a problem hiding this comment.
🟡 Changes recommended
Mixed-release ordering and build-less four-component request matching remain incorrect.
2 open findings
What changed in this PR
This PR addresses #1290 by preserving Liberica patch components when translating BellSoft versions into SDKMAN notation.
Changes:
- Normalize patch releases as
X.Y.Z+P.B. - Expand Java 17 and 25 regression coverage for selection, ordering, and missing builds.
- Document the notation and update the runtime bundle.
| File | Description |
|---|---|
src/distributions/liberica/installer.ts |
Preserve patch components during normalization. |
docs/advanced-usage.md |
Explain SDKMAN patch-release notation. |
dist/setup/63.index.js |
Include normalization changes in the runtime bundle. |
__tests__/distributors/liberica-installer.test.ts |
Expand patch-release regression coverage. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (patchVersion) { | ||
| return `${mainVersion}+${patchVersion}.${buildVersion}`; |
| const patchVersion = version.version.split('+')[0].split('.')[3]; | ||
| if (patchVersion) { | ||
| return `${mainVersion}+${patchVersion}.${buildVersion}`; |


Description:
Liberica patch releases still fail to resolve from
.sdkmanrcin v6.1.0 because BellSoft publishesX.Y.Z.P+B, while SDKMAN identifies the same release asX.Y.Z+P.B. The previous fix preserved build metadata but dropped the fourth component before+.Preserve that patch component when normalizing BellSoft versions, so
17.0.20.1+1resolves for17.0.20+1.1-librca. Replace synthetic API fixtures with realistic Java 17 and 25 metadata and cover exact artifact selection, patch/build ordering, and rejection of missing builds. Existing non-patch normalization is unchanged. Includes documentation and the regenerated runtime bundle; CRaC package support is outside this change.Validation:
npm run checkpassed (format, lint, build, and all 1,577 tests across 45 suites). The new regressions reproduced the failure before the fix.Related issue:
Fixes #1290
Follow-up to the report on #1267.
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.