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

Simplify DIPjavaio build by including a Bio-Formats "stub" jar file in the repo. #157

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

crisluengo
Copy link
Member

@crisluengo crisluengo commented May 8, 2024

I created a file javaio/java/bioformats/bio-formats-stripped.jar that contains the minimal set of .class files needed for the build of BioFormatsInterface.java. This file is used to resolve the references to functions and classes in bioformats_package.jar. Including this file means that:

  1. We don't need to download 40+ MB four times when running the deploy script.
  2. We can build DIPjavaio in CI, but we still can't test it.
  3. Build instructions are a little simpler for the end user.

Possible issues:

  1. Including a binary file in a repo is never nice. But this one is only 93 KB.
  2. Bio-Formats is GPL. But the core code is all 2-clause BSD (I've checked the license notice in the source .java file for each of the included .class files). It is some of the readers and writers (for specific file types) that are GPL. But even if it were GPL, we're not linking to it in outside of DIPjavaio, so this should all be fine.
  3. Future updates to DIPjavaio might reference other classes/functions in Bio-Formats, meaning we'll need to add more .class files back into the .jar file.

What do you think, should we use this or not?

@crisluengo crisluengo added the component:DIPjavaio About DIPjavaio or any of its interfaces label May 8, 2024
@crisluengo crisluengo requested a review from wcaarls May 8, 2024 17:21
Copy link
Member

@wcaarls wcaarls left a comment

Choose a reason for hiding this comment

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

Apart from the new complex64 error from numpy, this looks fine to me. But I'm no Java programmer :-) .

@crisluengo
Copy link
Member Author

Thank you! (You know much, much more about Java than I do.)

I've fixed the NumPy 2.0 thing in the master branch.

@crisluengo crisluengo merged commit 3afa432 into master Jun 17, 2024
3 of 6 checks passed
@crisluengo crisluengo deleted the bioformats-build-simplification branch June 17, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:DIPjavaio About DIPjavaio or any of its interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants