Skip to content

build: remove jnp-hipo dependence (a.k.a. HIPO 3) - #1536

Open
c-dilks wants to merge 1 commit into
developmentfrom
rm-hipo3
Open

c-dilks wants to merge 1 commit into
developmentfrom
rm-hipo3

Conversation

@c-dilks

@c-dilks c-dilks commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

jnp-hipo actually packs a lot of stuff, including things found in other JARs. To isolate what is actually being used, I first disabled dependency analysis checks, removed jnp-hipo form the POMs, and checked compiler errors, which revealed that only the following jnp-hipo classes are actually used in coatjava:

  • org.jlab.jnp.matrix.Matrix5x5_4x4
  • org.jlab.jnp.matrix.Matrix5x5
  • org.jlab.jnp.matrix.Matrix

The only modules that import these directly are:

  • common-tools/clas-tracking
  • reconstruction/dc
  • reconstruction/fmt
  • reconstruction/mu

All of these depend on common-tools/clas-physics, and no other Java code beyond coatjava uses these classes, so I've copied those 3 org.jlab.jnp.matrix classes into there, sourced from https://code.jlab.org/hallb/clas12/coatjava/jnp/-/tree/master/jnp-utils/src/main/java/org/jlab/jnp/matrix?ref_type=heads

This gives us a successful build, but re-enabling dependency analysis caused further errors, revealing additional transitive dependencies in jnp-hipo that we're using. They are all 'used undeclared dependency' cases, so they are resolved by simply including the actual dependency being used, directly:

  • common-tools/clas-detector, used undeclared dependency found: org.jlab.coda:jevio; turns out that jnp-hipo includes jevio in its JAR!
  • reconstruction/eb, used undeclared dependency found: org.jlab.jnp:jnp-hipo4; we just need the JsonObject class here, which is found in both jnp-hipo4 and jnp-hipo, so depend on jnp-hipo4 rather than jnp-hipo

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant