I’m working on a mixed Java/Clojure codebase, which is run on top of Storm (1.2.3, currently).
That version of Storm has a dependency on Clojure 1.7, and since the worker code is loaded by Storm itself, Clojure 1.7 is what I get when loading Clojure code for interop, despite Clojure 1.10 being included as a dependency.
This is preventing me from using e.g, Spec, which would be quite useful for this code.
Has anyone encountered such a problem before, and found a way around it? Basically, I’m looking for a way to get the 1.10 classes when I do an import clojure.java.api.Clojure; or similar.
I’m running on JDK8, so a custom class loader might be a solution, but I haven’t found any way to achieve this that way, either.
This might be too simple, I don’t have experience with Storm, but you could try to force it by setting the CLASSPATH environment variable to point at the Clojure 1.10 jar.
I will try to talk to the ops guys and see if they can do it. I don’t have direct access to the platform itself, which is why I was thinking about some custom class loader hack or similar, but I haven’t found a suitable way to do it from within the code (yet, anyway)