Skip to content

chore: add build support for newer JDKs #948

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

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

toddbaert
Copy link
Member

This PR adds the ability to build the contribs in the newest versions of Java, but still supports Java 8 which we want in CI for maximum compatibility.

To do this I had to:

  • use auto-detection of the JDK version to run the maven-surefire plugin differentially
  • add the bytebuddy workarounds as we have in the java-sdk

@liran2000
Copy link
Member

So #915 should be able to pass with this change?
The PR is sort of blocked since it depends on Java 11.

@toddbaert
Copy link
Member Author

So #915 should be able to pass with this change? The PR is sort of blocked since it depends on Java 11.

No, unfortunately. The problem there is that PR includes usage of the Java 11 HTTP client. That will work fine locally if you run the tests with Java 11+, but the CI still runs in Java 8, on purpose, to ensure compatibility.

We could consider some kind of means of doing multiple test runs, some on Java 8 and some on Java 11/X/Y/Z, and then simply say some providers require more recent Java versions - that would require more work though and we'd have to be very careful.

@toddbaert
Copy link
Member Author

So #915 should be able to pass with this change? The PR is sort of blocked since it depends on Java 11.

No, unfortunately. The problem there is that PR includes usage of the Java 11 HTTP client. That will work fine locally if you run the tests with Java 11+, but the CI still runs in Java 8, on purpose, to ensure compatibility.

We could consider some kind of means of doing multiple test runs, some on Java 8 and some on Java 11/X/Y/Z, and then simply say some providers require more recent Java versions - that would require more work though and we'd have to be very careful.

We could open an issue for this though. it's certainly technically possible.

@liran2000
Copy link
Member

So #915 should be able to pass with this change? The PR is sort of blocked since it depends on Java 11.

No, unfortunately. The problem there is that PR includes usage of the Java 11 HTTP client. That will work fine locally if you run the tests with Java 11+, but the CI still runs in Java 8, on purpose, to ensure compatibility.
We could consider some kind of means of doing multiple test runs, some on Java 8 and some on Java 11/X/Y/Z, and then simply say some providers require more recent Java versions - that would require more work though and we'd have to be very careful.

We could open an issue for this though. it's certainly technically possible.

Another option is to make another release version which will compile with newer Java from separate branches, and then both branches and release versions can co-exist.

@toddbaert toddbaert merged commit d26b891 into main Sep 11, 2024
4 checks passed
@toddbaert toddbaert deleted the chore/java-21-build branch September 11, 2024 12:29
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.

5 participants