integrant

drewr 2018-03-28T22:00:51.000108Z

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

drewr 2018-03-28T22:01:01.000386Z

and it's listed in the namespace list just before it

2018-03-28T22:02:35.000234Z

@drewr What namespace does it have a problem with? Is the namespace compilable?

drewr 2018-03-28T22:03:16.000045Z

it seems to be... the original (init) worked, and if I C-c C-k in the file it works

drewr 2018-03-28T22:06:05.000175Z

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]

2018-03-28T22:06:52.000203Z

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.

drewr 2018-03-28T22:06:59.000224Z

shia.time loads fine, as does shia.aws

drewr 2018-03-28T22:07:14.000154Z

yeah, it's reproducible

drewr 2018-03-28T22:07:23.000475Z

every time I go through that cycle

drewr 2018-03-28T22:07:41.000236Z

I am AOTing though

drewr 2018-03-28T22:07:54.000313Z

but I also run lein clean fairly regularly

2018-03-28T22:08:12.000308Z

Integrant-REPL is a wrapper around tools.namespace. I’m not sure how well that works with AOT.

2018-03-28T22:08:27.000183Z

Are you keeping AOT just for the uberjar, or have you set it up during development?

2018-03-28T22:08:35.000148Z

I’d recommend not using AOT at the REPL.

drewr 2018-03-28T22:08:48.000523Z

good point, it's just uberjar currently

drewr 2018-03-28T22:09:02.000279Z

but the classes are probably still around, not sure if that matters

2018-03-28T22:09:27.000025Z

If they’re on the classpath, it might matter.

drewr 2018-03-28T22:09:49.000287Z

ok, I can dig into it a bit more, just making sure it wasn't something obvious

2018-05-03T22:14:54.000347Z

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

2018-05-03T22:15:23.000296Z

I’ve never understood why leiningen doesn’t do this by default.

2018-05-03T22:37:17.000383Z

The reason Duct doesn’t do that by default is because that doesn’t play well with in-process compilers.

drewr 2018-03-28T22:10:57.000138Z

thanks for your great libraries James!

2018-03-28T22:11:32.000186Z

No problem. You might find your problem is listed as a tools.namespace issue.