Skip to content

Fix Liberica SDKMAN patch release resolution - #1291

Open
brunoborges wants to merge 1 commit into
actions:mainfrom
brunoborges:brunoborges-liberica-issue-verification
Open

brunoborges wants to merge 1 commit into
actions:mainfrom
brunoborges:brunoborges-liberica-issue-verification

Conversation

@brunoborges

Copy link
Copy Markdown
Contributor

Description:
Liberica patch releases still fail to resolve from .sdkmanrc in v6.1.0 because BellSoft publishes X.Y.Z.P+B, while SDKMAN identifies the same release as X.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+1 resolves for 17.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 check passed (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:

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

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
Copilot AI balanced review requested due to automatic review settings October 16, 2026 14:28
@brunoborges
brunoborges requested a review from a team as a code owner October 16, 2026 14:28
@brunoborges

Copy link
Copy Markdown
Contributor Author

@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: .sdkmanrc

Keep java=17.0.20+1.1-librca in your .sdkmanrc (or the original java=25.0.4+1.1-librca). Please use the fork reference above because this commit has not been merged into actions/setup-java yet, and let us know whether it resolves the failure.

@brunoborges brunoborges self-assigned this Oct 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment on lines +175 to +176
if (patchVersion) {
return `${mainVersion}+${patchVersion}.${buildVersion}`;
Comment on lines +174 to +176
const patchVersion = version.version.split('+')[0].split('.')[3];
if (patchVersion) {
return `${mainVersion}+${patchVersion}.${buildVersion}`;

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Liberica SDKMAN patch releases still fail to resolve in v6.1.0

2 participants