Skip to content

Support jdk-prefixed Java versions and exact abbreviated builds - #1281

Closed
brunoborges wants to merge 1 commit into
mainfrom
brunoborges-java-release-tag-normalization
Closed

brunoborges wants to merge 1 commit into
mainfrom
brunoborges-java-release-tag-normalization

Conversation

@brunoborges

Copy link
Copy Markdown
Contributor

Description:
java-version: jdk-27+35 currently fails validation before Temurin release discovery. Simply removing jdk- is insufficient: SemVer treats 27+35 as a major-version range and ignores the requested build.

Normalize numeric Java release tags in the shared helper, mapping jdk-27+35, 27+35, and 27.0+35 to 27.0.0+35 for exact-build matching. Versions without build metadata retain their range semantics. Reuse normalization in platform validation so prefixed inputs cannot bypass compatibility restrictions; package selection and existing early-access handling remain unchanged.

Adds regression coverage for normalization, competing and missing builds, tool-cache matching, malformed inputs, and package/platform restrictions. Updates supported-version documentation and regenerates action bundles. Release availability is not asserted; resolution tests use mocked metadata.

Validation: npm run check passed (format, lint, build, and all 45 test suites / 1,575 tests). npx tsc --noEmit passed.

Related issue:
Fixes: #1280

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.

Normalize jdk-prefixed numeric versions and pad abbreviated build requests so exact build constraints survive version matching. Keep platform and package validation consistent, document the syntax, and add regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@brunoborges
brunoborges requested a review from a team as a code owner October 5, 2026 16:07
Copilot AI balanced review requested due to automatic review settings October 5, 2026 16:07

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.

Copilot review overview

🟢 Approval recommended

The normalization behavior is consistently integrated, documented, tested, and reflected in generated runtime bundles.

Review effort: Balanced
Findings: None

What changed in this PR

Adds support for jdk--prefixed Java versions and exact abbreviated build matching.

Changes:

  • Normalizes release tags such as jdk-27+35 to 27.0.0+35.
  • Applies normalization to platform/package validation and resolution.
  • Adds documentation, regression tests, and regenerated bundles.
File Description
src/​util.ts Extends shared version normalization.
src/​distributions/​platform-types.ts Normalizes versions during compatibility checks.
src/​distributions/​base-installer.ts Uses normalization during installer validation.
README.md Documents supported release-tag syntax.
__tests__/​util.test.ts Tests normalization cases.
__tests__/​java-platform-contract.test.ts Tests architecture restrictions.
__tests__/​distributors/​temurin-installer.test.ts Tests exact Temurin build resolution.
__tests__/​distributors/​distribution-factory.test.ts Tests package and distribution handling.
__tests__/​distributors/​base-installer.test.ts Tests validation and tool-cache matching.
dist/​setup/​index.js Regenerates the setup bundle.
dist/​setup/​242.index.js Regenerates the installer chunk.
dist/​cleanup/​index.js Regenerates the cleanup bundle.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@brunoborges

Copy link
Copy Markdown
Contributor Author

Closing without merging: java-version expects a version number or supported version range, not a vendor release tag with a jdk- prefix. The reported input is a configuration issue and does not require expanding the accepted syntax.

@brunoborges brunoborges closed this Oct 5, 2026
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.

Temurin jdk-27+35 not found

2 participants