Fork me on GitHub
#immutant
<
2016-10-18
>
timgilbert22:10:30

Hi all, I'm having a little trouble with (wrap-reload) in an AOT-compiled jar

timgilbert22:10:58

...but the libraries exist on the classpath

timgilbert22:10:45

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)

timgilbert22:10:16

...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)

jcrossley322:10:49

@timgilbert sorry you're having trouble. i'm guessing things work when you don't AOT compile?

jcrossley322:10:02

i'm guessing you may need to explicitly refer to it before you AOT compile it

timgilbert22:10:36

I haven't actually tried skipping the AOT step, but I'll try it

timgilbert22:10:09

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

timgilbert22:10:24

Mostly just wanted to see whether anyone came across this before

timgilbert22:10:39

This is on Clojure 1.9b13, BTW

timgilbert22:10:19

If I can boil it down to more useful info I'll write up a ticket