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

improve Bytes.kt compatibilty for running from java 8 but compiling from java 11 #112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stevenwarejones
Copy link
Contributor

@stevenwarejones stevenwarejones commented May 9, 2022

Copy link
Member

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @SanjayVas and @stevenwarejones)

a discussion (no related file):
Where do we need Java 8 compatibility? While we currently use language version 8 (mainly because it doesn't matter much when using Kotlin), but I believe we've expected at least JDK 11 at runtime which IIUC doesn't have this issue.

If we do need Java 8 compatibility, then we should see about what we need for Bazel flags to use the appropriate --release option for javac as described in the article. We should also document explicitly that we intend to be compatible with Java 8 in this case. I know that there are some changes to how Bazel builds Java code in Bazel 5 if that has any impact. See #110


Copy link
Member

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @SanjayVas)

a discussion (no related file):

Previously, SanjayVas (Sanjay Vasandani) wrote…

Where do we need Java 8 compatibility? While we currently use language version 8 (mainly because it doesn't matter much when using Kotlin), but I believe we've expected at least JDK 11 at runtime which IIUC doesn't have this issue.

If we do need Java 8 compatibility, then we should see about what we need for Bazel flags to use the appropriate --release option for javac as described in the article. We should also document explicitly that we intend to be compatible with Java 8 in this case. I know that there are some changes to how Bazel builds Java code in Bazel 5 if that has any impact. See #110

Looks like --release isn't well-supported due to also blocking access to internal APIs like sun.misc.Unsafe, which is depended upon by protobuf.


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.

2 participants