Hi all, I'm having a little trouble with (wrap-reload)
in an AOT-compiled jar
I'm getting the error thrown from here: https://github.com/immutant/immutant/blob/master/web/src/immutant/web/middleware.clj#L37
...but the libraries exist on the classpath
user=> (require '[ring.middleware.reload])
nil
user=> (require '[ring.middleware.stacktrace])
nil
user=> (require '[clojure.java.classpath])
nil
user=> (require '[immutant.internal.util :as u])
nil
user=> (u/try-resolve 'ring.middleware.reload)
nil
user=> (u/require-resolve 'ring.middleware.reload)
NullPointerException clojure.lang.Symbol.intern (Symbol.java:59)
...actually it looks like the root of the problem is this:
user=> (require (symbol (namespace 'ring.middleware.reload)))
NullPointerException clojure.lang.Symbol.intern (Symbol.java:59)
@timgilbert sorry you're having trouble. i'm guessing things work when you don't AOT compile?
i'm guessing you may need to explicitly refer to it before you AOT compile it
I haven't actually tried skipping the AOT step, but I'll try it
The weird thing is that almost identical code is running correctly on a different environment, so I'm going to try checking my JVM versions and whatnot
Mostly just wanted to see whether anyone came across this before
This is on Clojure 1.9b13, BTW
If I can boil it down to more useful info I'll write up a ticket
@timgilbert thanks!