René's URL Explorer Experiment


Title: `java-version-file` with `asdf`'s `.tool-versions` fails for Corretto, also non-strict semver versions · Issue #615 · actions/setup-java · GitHub

Open Graph Title: `java-version-file` with `asdf`'s `.tool-versions` fails for Corretto, also non-strict semver versions · Issue #615 · actions/setup-java

X Title: `java-version-file` with `asdf`'s `.tool-versions` fails for Corretto, also non-strict semver versions · Issue #615 · actions/setup-java

Description: Description: Support for asdf's .tool-versions file was added to the java-version-file parameter with PR #606 in response to issue #579 - unfortunately, there's a difference between what asdf requires for this file, vs what setup-java su...

Open Graph Description: Description: Support for asdf's .tool-versions file was added to the java-version-file parameter with PR #606 in response to issue #579 - unfortunately, there's a difference between what asdf requi...

X Description: Description: Support for asdf's .tool-versions file was added to the java-version-file parameter with PR #606 in response to issue #579 - unfortunately, there's a difference between what as...

Opengraph URL: https://github.com/actions/setup-java/issues/615

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`java-version-file` with `asdf`'s `.tool-versions` fails for Corretto, also non-strict semver versions","articleBody":"**Description:**\r\nSupport for `asdf`'s `.tool-versions` file was added to the `java-version-file` parameter with PR https://github.com/actions/setup-java/pull/606 in response to issue https://github.com/actions/setup-java/issues/579 - unfortunately, there's a difference between what `asdf` requires for this file, vs what `setup-java` supports:\r\n\r\n### `asdf` requires that the Java version in `.tool-versions` is _fully_ specified\r\n\r\nSo a file will typically look like this:\r\n\r\n```\r\njava corretto-21.0.2.13.1\r\n```\r\n\r\nIf you shorten the version, eg to `21.0.2` or `21`, and run `asdf install java`, you'll get this error from `asdf`:\r\n\r\n```\r\nUnknown release: corretto-21.0.2\r\n```\r\n\r\n### `setup-java` only supports major versions or strict 3-part semver\r\n\r\n`setup-java` supports version numbers of 1 to 3 dot-separated integers (eg `major` to `major.minor.patch`). This excludes several valid version numbers - here are some examples:\r\n\r\n- all Corretto version numbers, which are always at least 4-part (eg `21.0.2.13.1` or `8.322.06.4`)\r\n- Zulu `8.74.0.17`\r\n- sapmachine `11.0.16.1`\r\n- Oracle `18.0.2.1`\r\n- Microsoft `17.0.1.12.1`\r\n\r\n### `setup-java` _only_ supports major versions for Corretto\r\n\r\nThis is probably due to AWS Corretto only providing a simple API for looking up Java versions, that only supports getting the latest version for each major version of Java:\r\n\r\nhttps://github.com/actions/setup-java/blob/99b8673ff64fbf99d8d325f52d9a5bdedb8483e9/src/distributions/corretto/installer.ts#L100\r\n\r\nSo, Corretto with the `java-version-file` parameter is doubly unsupported:\r\n\r\n* Corretto 5-part version numbers don't match the regex's used by `setup-java` to verify version numbers\r\n* Even if Corretto version numbers were accepted, `corretto/installer.ts` wouldn't be able to locate and download the specific Corretto version, because it can only support finding by `major` version number https://github.com/actions/setup-java/blob/99b8673ff64fbf99d8d325f52d9a5bdedb8483e9/src/distributions/corretto/installer.ts#L61-L62\r\n\r\n\r\n\r\n**Task version:**\r\n\r\n[v4.2.1](https://github.com/actions/setup-java/releases/tag/v4.2.1)\r\n\r\n**Platform:**\r\n- [x] Ubuntu\r\n- [ ] macOS\r\n- [ ] Windows\r\n\r\n**Runner type:**\r\n- [x] Hosted\r\n- [ ] Self-hosted\r\n\r\n**Repro steps:**  \r\nDefine an invocation of `actions/setup-java` in a workflow, and point `java-version-file` to `.tool-versions`:\r\n\r\n[**.github/workflows/ci.yml**](https://github.com/guardian/etag-caching/blob/959d4dc2ef049c72eda32126c850fbeee078b704/.github/workflows/ci.yml) :\r\n```\r\n        uses: actions/setup-java@v4\r\n        with:\r\n          distribution: zulu\r\n          java-version-file: .tool-versions\r\n```\r\n\r\nIn `.tool-versions`, define a version like `zulu-8.58.0.13` - and verify that works by executing `asdf install java`:\r\n\r\n[**.tool-versions**](https://github.com/guardian/etag-caching/blob/959d4dc2ef049c72eda32126c850fbeee078b704/.tool-versions) :\r\n```\r\njava zulu-8.58.0.13\r\n```\r\n\r\nThe let the `ci.yml` workflow run.\r\n\r\n**Expected behavior:**\r\nIdeally, if the `.tool-versions` file is valid for `asdf`, `setup-java` should install that precise version of Java. This means `setup-java` needs to accept all versions output by `asdf list-all java`.\r\n\r\nWhere a distribution has been specified that `setup-java` is unable to search for precise Java versions (ie Corretto), if the user has set a `java-version-accept-any-matching-major-version` parameter to `true` it should just install the latest version of Java for that major version.\r\n\r\n**Actual behavior:**\r\n\r\n`zulu-8.58.0.13` in `.tool-versions` (https://github.com/guardian/etag-caching/commit/959d4dc2ef049c72eda32126c850fbeee078b704) : \r\nhttps://github.com/guardian/etag-caching/actions/runs/8470107933/job/23207054598#step:3:16\r\n```\r\nNo supported version was found in file .tool-versions\r\n```\r\n\r\n![image](https://github.com/actions/setup-java/assets/52038/c5a93ad0-7d60-4034-b76a-a184a6a17624)\r\n\r\n\r\ncc @aparnajyothi-y @mahabaleshwars @HarithaVattikuti\r\n","author":{"url":"https://github.com/rtyley","@type":"Person","name":"rtyley"},"datePublished":"2024-03-28T17:47:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/615/setup-java/issues/615"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c8e10971-821a-ddb5-3603-040e247577b1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB41A:10CC01:3046C3:424614:6A617395
html-safe-nonce339e645051511fabf6bd702ee8d265ec88c273ccbcbb3416d9fcd3a68329a224
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDFBOjEwQ0MwMTozMDQ2QzM6NDI0NjE0OjZBNjE3Mzk1IiwidmlzaXRvcl9pZCI6Ijc3MTM4ODk0NzAxNzQ1NTcwNzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac642d348db1ef53d512da726815f7b6a47fb737dc5da0eea48262465e0b2df45f
hovercard-subject-tagissue:2213798810
github-keyboard-shortcutsrepository,issues,actions,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-java/615/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b353c8a20c6d26ef671048fbe84d24e8a1e704a89f1b73ed0542472d1eb66558/actions/setup-java/issues/615
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b353c8a20c6d26ef671048fbe84d24e8a1e704a89f1b73ed0542472d1eb66558/actions/setup-java/issues/615
og:image:altDescription: Support for asdf's .tool-versions file was added to the java-version-file parameter with PR #606 in response to issue #579 - unfortunately, there's a difference between what asdf requi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamertyley
hostnamegithub.com
expected-hostnamegithub.com
Noneb05bb6314e7e93021a7b7dab54a85cbe48d821938e762c1dff815efd60699622
turbo-cache-controlno-preview
go-importgithub.com/actions/setup-java git https://github.com/actions/setup-java.git
octolytics-dimension-user_id44036562
octolytics-dimension-user_loginactions
octolytics-dimension-repository_id196057608
octolytics-dimension-repository_nwoactions/setup-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id196057608
octolytics-dimension-repository_network_root_nwoactions/setup-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release94389bfdcd393b0a5a274aee94e8a9739d063fe5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/actions/setup-java/issues/615#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Factions%2Fsetup-java%2Fissues%2F615
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Factions%2Fsetup-java%2Fissues%2F615
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=actions%2Fsetup-java
Reloadhttps://github.com/actions/setup-java/issues/615
Reloadhttps://github.com/actions/setup-java/issues/615
Reloadhttps://github.com/actions/setup-java/issues/615
Please reload this pagehttps://github.com/actions/setup-java/issues/615
actions https://github.com/actions
setup-javahttps://github.com/actions/setup-java
Notifications https://github.com/login?return_to=%2Factions%2Fsetup-java
Fork 863 https://github.com/login?return_to=%2Factions%2Fsetup-java
Star 2k https://github.com/login?return_to=%2Factions%2Fsetup-java
Code https://github.com/actions/setup-java
Issues 10 https://github.com/actions/setup-java/issues
Pull requests 6 https://github.com/actions/setup-java/pulls
Actions https://github.com/actions/setup-java/actions
Projects https://github.com/actions/setup-java/projects
Security and quality 0 https://github.com/actions/setup-java/security
Insights https://github.com/actions/setup-java/pulse
Code https://github.com/actions/setup-java
Issues https://github.com/actions/setup-java/issues
Pull requests https://github.com/actions/setup-java/pulls
Actions https://github.com/actions/setup-java/actions
Projects https://github.com/actions/setup-java/projects
Security and quality https://github.com/actions/setup-java/security
Insights https://github.com/actions/setup-java/pulse
java-version-file with asdf's .tool-versions fails for Corretto, also non-strict semver versionshttps://github.com/actions/setup-java/issues/615#top
https://github.com/mahabaleshwars
bugSomething isn't workinghttps://github.com/actions/setup-java/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/rtyley
rtyleyhttps://github.com/rtyley
on Mar 28, 2024https://github.com/actions/setup-java/issues/615#issue-2213798810
#606https://github.com/actions/setup-java/pull/606
#579https://github.com/actions/setup-java/issues/579
setup-java/src/distributions/corretto/installer.tshttps://github.com/actions/setup-java/blob/99b8673ff64fbf99d8d325f52d9a5bdedb8483e9/src/distributions/corretto/installer.ts#L100
99b8673https://github.com/actions/setup-java/commit/99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
setup-java/src/distributions/corretto/installer.tshttps://github.com/actions/setup-java/blob/99b8673ff64fbf99d8d325f52d9a5bdedb8483e9/src/distributions/corretto/installer.ts#L61-L62
99b8673https://github.com/actions/setup-java/commit/99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
v4.2.1https://github.com/actions/setup-java/releases/tag/v4.2.1
.github/workflows/ci.ymlhttps://github.com/guardian/etag-caching/blob/959d4dc2ef049c72eda32126c850fbeee078b704/.github/workflows/ci.yml
.tool-versionshttps://github.com/guardian/etag-caching/blob/959d4dc2ef049c72eda32126c850fbeee078b704/.tool-versions
guardian/etag-caching@959d4dchttps://github.com/guardian/etag-caching/commit/959d4dc2ef049c72eda32126c850fbeee078b704
https://github.com/guardian/etag-caching/actions/runs/8470107933/job/23207054598#step:3:16https://github.com/guardian/etag-caching/actions/runs/8470107933/job/23207054598#step:3:16
https://private-user-images.githubusercontent.com/52038/317825154-c5a93ad0-7d60-4034-b76a-a184a6a17624.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODQ3NzE3NzcsIm5iZiI6MTc4NDc3MTQ3NywicGF0aCI6Ii81MjAzOC8zMTc4MjUxNTQtYzVhOTNhZDAtN2Q2MC00MDM0LWI3NmEtYTE4NGE2YTE3NjI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzIzVDAxNTExN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdlZGU5Yjc1ZDk0YzAwYzRmNDZmNjY5MzI4NmIzYWU1MWFiYThkZGZhYTJhNTYxZDRlNTUyMWYwOGIzMmVlODcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.lFxkF4tcLDLztdNq_usMUoLwbCE_7YHtxDTYjsGdjGk
@aparnajyothi-yhttps://github.com/aparnajyothi-y
@mahabaleshwarshttps://github.com/mahabaleshwars
@HarithaVattikutihttps://github.com/HarithaVattikuti
mahabaleshwarshttps://github.com/mahabaleshwars
bugSomething isn't workinghttps://github.com/actions/setup-java/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.