I'm trying to use (reset)
from integrant.repl and it frequently complains about a namespace that it can't find, though it clearly could the first time through
and it's listed in the namespace list just before it
@drewr What namespace does it have a problem with? Is the namespace compilable?
it seems to be... the original (init)
worked, and if I C-c C-k
in the file it works
user> (reset)
:reloading (shia.time shia.aws github.time github.core shia.github.issues shia.http.handler shia.http.server shia.elasticsearch.connection shia.core shia.core-test shia.bot shia.github.repos s\
hia.http.dev user shia.elasticsearch)
:error-while-loading shia.aws
#error {
:cause "Could not initialize class shia.aws__init"
:via
[{:type java.lang.NoClassDefFoundError
:message "Could not initialize class shia.aws__init"
:at [java.lang.Class forName0 "Class.java" -2]}]
:trace
[[java.lang.Class forName0 "Class.java" -2]
[java.lang.Class forName "Class.java" 348]
Have you restarted the REPL? Does the bug happen consistently? Sometimes it can get into a weird state, especially if there’s some AOT or something involved.
shia.time
loads fine, as does shia.aws
yeah, it's reproducible
every time I go through that cycle
I am AOTing though
but I also run lein clean
fairly regularly
Integrant-REPL is a wrapper around tools.namespace. I’m not sure how well that works with AOT.
Are you keeping AOT just for the uberjar, or have you set it up during development?
I’d recommend not using AOT at the REPL.
good point, it's just uberjar currently
but the classes are probably still around, not sure if that matters
If they’re on the classpath, it might matter.
ok, I can dig into it a bit more, just making sure it wasn't something obvious
For what it’s worth adding this line to your project.clj
has usually fixed these sort of issues for me:
https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L308
cc @weavejester
I’ve never understood why leiningen doesn’t do this by default.
The reason Duct doesn’t do that by default is because that doesn’t play well with in-process compilers.
thanks for your great libraries James!
No problem. You might find your problem is listed as a tools.namespace issue.