| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
asdf-java encodes the JDK vendor as a prefix on the version string in .tool-versions (e.g. `java temurin-17.0.3+7`). Capture that prefix and map it to a setup-java distribution, mirroring the existing .sdkmanrc behavior. Unknown prefixes warn and fall back to the distribution input. Fixes #1081 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Adds support for inferring distribution from asdf-java vendor prefixes in .tool-versions, bringing it in line with the existing .sdkmanrc distribution inference behavior in actions/setup-java.
Changes:
| File | Description |
|---|---|
| src/util.ts | Captures asdf vendor prefix from .tool-versions, maps it to a setup-java distribution, and threads it through existing version parsing. |
| __tests__/util.test.ts | Adds .tool-versions test cases for supported vendors, prefix-less behavior, and unsupported vendor warnings. |
| docs/advanced-usage.md | Documents .tool-versions vendor-prefix distribution inference and lists supported mappings + example. |
| dist/setup/index.js | Regenerated compiled distribution output reflecting the updated util logic. |
| dist/cleanup/index.js | Regenerated compiled distribution output reflecting the updated util logic. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…tribution-from-tool-versions
* Infer distribution from asdf .tool-versions vendor prefix asdf-java encodes the JDK vendor as a prefix on the version string in .tool-versions (e.g. `java temurin-17.0.3+7`). Capture that prefix and map it to a setup-java distribution, mirroring the existing .sdkmanrc behavior. Unknown prefixes warn and fall back to the distribution input. Fixes actions#1081 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> (cherry picked from commit 4db08ef)
actions#1084) Regenerate the CommonJS bundle so the compiled dist/ reflects the source changes backported from main, without the ESM migration (actions#1078). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Why
asdf's .tool-versions encodes the JDK vendor as a prefix on the version string (for example java temurin-17.0.3+7 or java corretto-11.0.14.9.1). Until now setup-java discarded that prefix, so users pointing java-version-file at a .tool-versions file still had to pass distribution explicitly. .sdkmanrc already infers the distribution; this brings .tool-versions to parity.
Fixes: #1081
What
No caller changes were needed. setup-java.ts already consumes versionInfo.distribution generically.
Vendor mapping
Notes for reviewers
Testing