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

Make project compile against jdk8 #244

Open
ksumit opened this issue Nov 17, 2023 · 7 comments · May be fixed by #245
Open

Make project compile against jdk8 #244

ksumit opened this issue Nov 17, 2023 · 7 comments · May be fixed by #245

Comments

@ksumit
Copy link

ksumit commented Nov 17, 2023

Not able to compile the project against JDK8 on my WSL. There are multiple issues it seems:

  1. It's referring to a JDK9 flag during compilation.
  2. It's using a lambda syntax that fails to compile on JDK8.
@ksumit ksumit linked a pull request Nov 17, 2023 that will close this issue
@ksumit
Copy link
Author

ksumit commented Nov 17, 2023

@the-other-tim-brown
Copy link
Contributor

@ksumit please check out the readme. You'll be using java 11 to compile.

@ksumit
Copy link
Author

ksumit commented Nov 17, 2023

@the-other-tim-brown is that restriction desirable? we are generating jdk8 builds only, hence this suggestion.

@the-other-tim-brown
Copy link
Contributor

Java 11 is already 5 years old at this point. This is a new project. We arguably should use a newer version than 11 like 17 (trino is built with java 17 for example). The jars we produce are compatible with java 8 to allow for users to add these to their existing environments that may not have upgraded.

@ksumit
Copy link
Author

ksumit commented Nov 17, 2023

I chatted about this with @ashvina this morning. The production reality is that JDK8 is still the most in use (at least within bigdata ecosystem). We should compile the project against JDK8 to ensure we don't end up taking a dependency on a library that is only compatible with higher versions of JDK. Let's discuss this offline if we can find a middle ground where developers feel empowered to use a higher version of JDK for development but we are still guaranteeing a JDK8 compatible build output along with runtime dependencies being compatible with JDK8.

@the-other-tim-brown
Copy link
Contributor

Can you share the market research/data on this?

@the-other-tim-brown
Copy link
Contributor

The compiler should error out if we use any incompatible features since we use the release option instead of the source/target options.

This means that, unlike the [-source and -target options](https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html), the compiler will detect and generate an error when using APIs that don't exist in previous releases of Java SE.

Docs: https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html

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 a pull request may close this issue.

2 participants