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

Update to Java 11 & support JPMS #1474

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Mechite
Copy link

@Mechite Mechite commented Jul 21, 2023

Motivation

JPMS is used by the vast majority of publically released libraries. The performance benefits it provides over the generic classpath, and better compile-time verification is very important. Without native support for JPMS, nobody can release a public library using JPMS and Minio safely.

Downsides

This will break support for Java 1.8, and Java 9 or over will be needed to use Minio. In the PR that I have created, Java 11 is the base version as it is the next LTS release after 1.8. Most people consider Java 1.8 as "ancient" by modern standards, but it is still used today in a lot of commercial software. The best way to maintain support will be to simply refer people to the older versions of the client, or the official S3 clients.

A hacky way people tend to retain support for Java 1.8 is to compile the module-info with Java 9/11, and the rest of the project with Java 1,8. This is not the most elegant build toolchain but is a valid solution nevertheless.

Issues

This PR should not build correctly, as I have not thoroughly checked if all requires statements are defined, and there are likely several other issues.
This PR also uses open module for all of the declarations, as I was conducting some quick tests with Spring - this can be changed, and probably should be changed as the client does not seem to require any kind of reflection.

@Mechite Mechite mentioned this pull request Jul 21, 2023
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Copy link
Member

Choose a reason for hiding this comment

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

Our source code and minimum supported version is 1.8.

Copy link
Author

Choose a reason for hiding this comment

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

Aware.

adminapi/src/main/java/module-info.java Outdated Show resolved Hide resolved
api/src/main/java/module-info.java Outdated Show resolved Hide resolved
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.

None yet

3 participants