Fix cross language tests at least on macOS - #8
Merged
Conversation
mvn package only produced target/classes/ with no dependency JARs. The cross-language test runner looks for a *-jar-with-dependencies.jar first; without it, it fell back to target/classes/ alone, leaving n5, n5-zarr, imglib2, etc. off the classpath at runtime. Done with the help of Claude Sonnet and Tobias Pietzsch.
JNA ignores -Djava.library.path and uses its own -Djna.library.path property to locate native libraries. The cross-language test runner was passing the wrong property, so libblosc.dylib was never found regardless of whether c-blosc was installed via homebrew. Again, Claude and Tobias
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two issues prevented the Python/Java round-trip tests from running at all.
mvn packageproduced no runnable jarThe
pom.xmlhad nomaven-assembly-plugin, somvn packageonly wrote compiled classes totarget/classes/with no dependency JARs alongside them. The test runner looks for a*-jar-with-dependencies.jarfirst; without it, it fell back to
target/classes/alone, leaving n5, n5-zarr, imglib2 and friends off the classpath. Every test failed immediately withNoClassDefFoundError: org/janelia/saalfeldlab/n5/N5Reader.Fix: add
maven-assembly-pluginto thebuildprofile somvn packagealso producestarget/geff-*-jar-with-dependencies.jar.Blosc native library was never found
JNA (used by
n5-bloscto loadlibblosc) ignores-Djava.library.pathand uses its own-Djna.library.pathproperty instead. The test runner was passing the wrong property, so even with c-blosc correctly installedvia Homebrew, JNA could not locate
libblosc.dyliband every run crashed withUnsatisfiedLinkError.Fix: pass
-Djna.library.pathinrun_tests.py, consistent with how the Maven Surefire config already does it inpom.xml.Done with the help of Claude Sonnet to make sense of the error, and @tpietzsch