Replies: 1 comment 3 replies
-
It could be a feature request issue but this conversation is fine to track it. Yes, setup-ruby currently just uses the default JAVA_HOME for simplicity. I don't think it's really feasible nor desirable to "depend" on setup-java, it would be complicated, brittle and add a lot of dead code for non-JRuby. |
Beta Was this translation helpful? Give feedback.
-
This should be an issue but the issue-filing requirements are incompatible with my situation.
I could find no documentation or code in the setup-ruby action that specifies or allows configuring the Java version used to run JRuby.
We would like to switch jruby-head builds to JRuby 10, which requires Java 21. JRuby 9.4, the current supported line, works fine on Java 21 as well, so I believe it would be safe to make setup-ruby always use Java 21... but I suspect it currently just defaults to whatever is the default Java on the runner.
If that is the case, JRuby users will be required to also configure the setup-java action or other OS-specific mechanisms (java-alternatives, etc) to update it. For example, the Ubuntu runners install Java 8, 11, 17, and 21, but the ubuntu-20.04 runners default to Java 11 and even the latest ubuntu-24.04 runners only default to Java 17.
My gut says that setup-ruby should depend on setup-java when running JRuby and pass through appropriate configs for version and distribution (defaulting to 21 and temurin or zulu perhaps).
Beta Was this translation helpful? Give feedback.
All reactions