-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for JetBrains Runtime #637
base: main
Are you sure you want to change the base?
Conversation
- Add Installer, Models - Includes Tests & Test Manifest Data - Add to `e2e-versions.yml` - Run `npm run build` - Update README.md
I'm using your branch as a workaround # TODO: replace this once https://github.com/actions/setup-java/pull/637 gets merged.
- uses: gmitch215/setup-java@07ea605e4b1f0f8b0621155fb1722d6094c3e183
with:
distribution: 'jetbrains'
java-version: 17 with an error: Installed distributions
Error: No supported distribution was found for input jetbrains is there anything I can do? See: |
Hmm, I'll debug and get back here later. |
Seems I just forgot to add it to the map of recognized runtimes to their IDs. Update your commit hash and it should succeed. My project passed with the following configuration: - name: Setup JBR 17
uses: gmitch215/setup-java@7f3ab2648f3d20faa20c4fe6e52a455757e0f38a
with:
distribution: 'jetbrains'
java-version: 17
cache: 'gradle' |
It could be picked correctly now! But seems some libs are missing in this JDK installed. Execution failed for task ':checkRuntime'.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
> Failed to check JDK distribution: 'jlink', 'jpackage' are missing
JDK distribution path: /Users/runner/hostedtoolcache/Java_JetBrains_jdk/17.0.11-1312.2/arm64/Contents/Home See https://github.com/Goooler/kotlin-explorer/actions/runs/9575738587/job/26401058613. |
The JDK installed by Gradle
Seems we need |
I switched the URL to the ones listed in the |
I guessed correctly! - name: Setup JBR 17
uses: gmitch215/setup-java@99fc2135f7f7b08068e180cb5f29340f9de70720
with:
distribution: 'jetbrains'
java-version: 17
cache: 'gradle' (This action failed due to below) Note: Running on |
99fc213 works for me now, someone who needs this can ref romainguy/kotlin-explorer#62. Thanks for your quick response! |
Got - name: Setup JBR 17
uses: gmitch215/setup-java@e1f4c15facc0cf68c0e764340e374be034e4a859
with:
distribution: 'jetbrains'
java-version: 17
cache: 'gradle' |
Thank you @gmitch215, I'm using your branch as a workaround too and can confirm it works fine! |
On a relatively complex workflow with a fan-out setup and composite actions that parallelize builds I get rate limit failures from time to time:
Is there something that can be done in this action's implementation or on my side? |
@eskatos The JetBrains Your best bet is to do something that changes the IP (not sure if re-running it manually does this, but worth a shot). Unless someone knows how the runner could provide authentication. Edit: This error page is about the GitHub API, which is something I need to add. However, the above is still true. Edit 2: Done. - name: Setup JBR 21
uses: gmitch215/setup-java@b4d76a354bef7187244f74eea4e80e674a7b4b55
with:
distribution: 'jetbrains'
java-version: 21
cache: 'gradle' |
Re-running did make the job pass indeed.
Thank you for fixing this! |
With b4d76a3 I'm getting this:
|
@eskatos I forgot GitHub doesn't automatically inject the The action should now check if it is provided. Update to this: - name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
distribution: 'jetbrains'
java-version: 21
cache: 'gradle'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
+1. Will try to resolve the merge conflicts at some point. |
Conflicts have been resolved. @HarithaVattikuti would love to see this PR get merged. |
Hello @gmitch215 , We are working to prioritize this feature. We will update you once we have some feedback. |
Hi, @gmitch215 - thanks for your work!!!
Till this is merged? Thanks again |
Sure. The most recent commit for the workaround is available in the top message of this PR. |
@HarithaVattikuti been 2 weeks since we last spoke, any updates? |
Hi @gmitch215, a few checks are failing in the PR: Build the project using Prettier: Ensure that you run Prettier to format the code properly. JDK 11 Naming Convention Issue: When using JDK 11, the system expects the version to be in the format 11_0_16b2043.64 instead of 11.0.16-b2043.64. This discrepancy is causing the current failure. Please update the PR once these issues are resolved. |
- Fix JDK 11 URL Bug - Add JDK URL Testing to ensure versions can be downloaded - Run Prettier
@mahabaleshwars Issues fixed. I also added a test suite that checks if the URLs return 403 (access denied, meaning not found) instead of 200/302. |
Hello @gmitch215, Many of the checks are still failing, including those for JDK 11. Additionally, some links requested for JDK 11 are not available. For example, when tried on a Windows runner, the following URL was requested from the workflow: https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-11.0.13-windows-x64-b1504.49.tar.gz, but it is not available at the source. Could you please rectify these issues and update the PR? Before committing, please run the following commands in your project to ensure proper formatting and build success: npm run format Thank you! |
Switched to plain |
Hello @gmitch215, Many of the checks are still failing, including those for JDK 11. Please review the changes on your end and address these issues. Once updated, kindly update the PR. |
Hello @gmitch215, Could you please confirm if the issues have been resolved and the PR has been updated? We would like to proceed with testing and approval once it's ready. |
The issues haven't been resolved yet - I'm still working on trying to figure out what the issues are with JDK 11 specifically. I'll get back to you once I've completed it. |
- Add `GITHUB_TOKEN` environment variable for JetBrains requests - Add `jetbrains` to other E2E tests
Try this build. I also added some more tests to |
It appears that sometimes JetBrains will make certain URLs inaccessible for some reason, so I check with |
This one should work. There is an additional I also added some new package types:
Along with its JRE counterparts. There are also some GitHub API-related issues in |
Current Workaround
Description:
This PR adds support for the JetBrains Runtime, which is required in dependencies like jewel and useful for Compose Multiplatform.
The PR uses the binaries listed in
Binaries for Developers
, using theJBRSDK
flavor as shown in the releases page. It uses the GitHub API to find and parse versions, then calculates the URL usingcache-redirector.jetbrains.com
with the parsed SemVer, OS, Arch, and build number, which all output a.tar.gz
file. Left a few comments in there for maintainability.Since this uses the GitHub API, you can optionally specify a
GITHUB_TOKEN
environmental variable to increase your rate limit.Related issue:
Check list:
Notes
Tested using
jetbrains-installer.test.ts
. Most of the tests were copied from other installers, but some I couldn't figure out how to bring over, so additional work may be required. I also copieddownloadTool
from the Temurin installer.I also executed
npm run build
fordist/setup/index.js
. I think something else was also thrown because I was on TypeScript 5.3, so I'm not sure how that will affectncc
.