-
Notifications
You must be signed in to change notification settings - Fork 245
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
Java 17 support #3815
Java 17 support #3815
Conversation
The On a separate note, when running the test suite you will run into issues with the file leak detector using Java 17: |
Thanks for cross-linking to this issue which was definitely on my radar. The upgrade of file-leak-detector to 1.15 was necessary in order to get the test-suite simply running under Java 17. As per the nature of the changes, some of the logic might possibly have been disabled. On the other hand, file leak detection should at least remain functional both under Java 8 and Java 11 (as #3828 should demonstrate). Also using the occasion to capture the progress on this investigation, with the set of changes above, the tests were executed once against the curated QA repository under Java 17 - see https://merge-ci.openmicroscopy.org/jenkins/job/BIOFORMATS-test-repo/1154 for the build logs. The run was overall successful and only failed on 6 folders. These will need closer examination and I expect changes similar to #3796 will be required. |
Testing the memo file generation on JDK 17 with one of the failing samples points at the serialization of
From a quick review of https://merge-ci.openmicroscopy.org/jenkins/job/BIOFORMATS-test-repo/1154, several of the formats which failed the tests (
|
Prevents memo saving issues with Java 17.
Prevents memo saving issues with Java 17.
Prevents memo saving issues with Java 17.
Prevents memo saving issues with Java 17.
EsotericSoftware/kryo#859 (comment) is maybe related. One approach is to switch the |
That's great. Do you want to add these commits to this branch so that we can get them testing in JDK 8/11 before re-enabling JDK17? I think the errors in For
which comes down to the |
fb60d7c reverts the
Shortly, the issue is that the Ant build is using the maven-ant-tasks project to resolve dependencies. The goal of this change was to reduce the need for the dependencies to be declared twice and have both Ant and Maven using the POM file as the single source of truth. Unfortunately, this component is now retired, unsupported and internally uses the hardcoded HTTP version of the Central repository (which has now been updated to HTTPS - https://links.sonatype.com/central/501-https-required) to resolve parent POMs. A couple of options from a quick brainstorming with @melissalinkert, rouhgly listed in order ranging from the minimal cost+value to the maximal cost+value:
Immediately, fb60d7c will allow us to test the other fixes and start considering options for the |
For for chiming in late, but just wanted to add that I assume since Location is in our code we could provide a serializer for it to not need to switch to But in general, this incompatibility between Java internals and Kryo doesn't fill me with fuzzies. |
This pull request has been mentioned on Image.sc Forum. There might be relevant details there: |
|
||
/* | ||
* Open MeasurementSettings file | ||
*/ | ||
|
||
RandomAccessInputStream result = | ||
new RandomAccessInputStream(measurementResultFile.getAbsolutePath()); | ||
new RandomAccessInputStream(measurementResultFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe take advantage of try with resources
here. This will be in the spirit of introducing new Java version
After reincluding this in the daily CI builds, Saturday's run revealed only 2 formats are currently failing the tests on Java 17: |
ome-codecs with the updated aircompressor has now been released and should be available to bump to https://github.com/ome/ome-codecs/releases/tag/v0.4.2 |
Unfortunately upgrading |
With the inclusion of #3923, the Ant workflow can now be reactivated and Java 17 also added to the matrix. The CI builds have been passing consistently for the last few week with the repository tests being executed successfully on JDK 8, JDK 11, JDK 17. The latest state of this branch obviously needs to be re-evaluated but assuming no regression, there is nothing else coming from my side on this front. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All builds and tests have been stable with this PR included for a while now. Getting this merged for inclusion with the 6.12.0 release
Fixes #3659
Java 17 LTS was released in September 2021 and in getting increasing used in the community by consumers of Bio-Formats e.g.
bioformats2raw
orQuPath
. While there has been few reports so far indicating, this PR aims to bring full Java 17 support to Bio-Formats in the upcoming minor release, adding the required testing infrastructure and making the minimal set of code changes.Summary of changes:
test-suite
infrastructure to have the automated tests running against JDK 17ome-codecs
to0.4.2
which includes the required upgrade ofio.airlit.aircompressor
to version 0.21. As demonstrated in the discussion of this PR, this change required Switch to Maven Artifact Resolver Ant tasks #3923 to fix the Ant buildRelated work: