Skip to content
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

Set rake-compiler source and target to Java 8 #1071

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

headius
Copy link
Contributor

@headius headius commented Nov 25, 2024

This patch forces rake-compiler to emit bytecode for Java 8 level of JVM. rake-compiler currently defaults to Java 1.7 source and target, but that version is no longer supported by recent JDKs such as Java 21 (see rake-compiler/rake-compiler#242 for a patch to update rake-compiler).

This patch sets our minimum Java level to 8, bypassing the default in rake-compiler and allowing builds on Java 21+.

This patch forces rake-compiler to emit bytecode for Java 8 level
of JVM. rake-compiler currently defaults to Java 1.7 source and
target, but that version is no longer supported by recent JDKs
such as Java 21 (see rake-compiler/rake-compiler#242
for a patch to update rake-compiler).

This patch sets our minimum Java level to 8, bypassing the default
in rake-compiler and allowing builds on Java 21+.
@headius
Copy link
Contributor Author

headius commented Nov 25, 2024

This can be merged and released at any time. Without this, it is not possible to build the concurrent-ruby extension for JRuby on Java 21 or higher.

@headius headius merged commit 957cf7d into ruby-concurrency:master Nov 25, 2024
14 checks passed
@headius headius deleted the java_8_minimum branch November 25, 2024 19:55
@headius
Copy link
Contributor Author

headius commented Nov 25, 2024

Small correction: this does not require immediate release. Merging to the repository fixes issues in JRuby 10's CI which runs a minimum of Java 21.

Once released, all extensions will be Java 8 minimum, but I believe the current 1.7 extensions can still load on Java 21 (it just can't output 1.7 bytecode).

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.

1 participant