Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Lamina breaks reloading in REPL #82

coltnz opened this Issue · 9 comments

3 participants


Don't quite see through the magic to know whats going on, but basically my app can't reload at the REPL because Alia can't reload because Lamina can't reload..

user=>  (require '[lamina.core] :reload)
user=>  (require '[lamina.core] :reload-all)

CompilerException java.lang.ClassCastException: cannot be cast to, compiling:(core.clj:181:20)
user=> (pst)
CompilerException java.lang.ClassCastException: cannot be cast to, compiling:(core.clj:181:20)
    clojure.lang.Compiler$InvokeExpr.eval (
    clojure.lang.Compiler$DefExpr.eval (
    clojure.lang.Compiler.eval (
Caused by:
ClassCastException cannot be cast to
    lamina.trace.probe/probe-channel- (probe.clj:79)
    lamina.trace.probe/fn--21299 (probe.clj:126)
    lamina.trace.probe/probe-channel-generator/fn--21293 (probe.clj:113)
    lamina.executor.core/executor (core.clj:69)
    clojure.lang.Compiler$InvokeExpr.eval (


That's unfortunate.
Let me know if that's a blocker for you, I'd consider moving the lamina based async function to a separate namespace (at least if you don't use it you wouldnt encounter this issue).

@ztellman the code in question is here


@coltnz I looked into this, apparently it was caused by a typo and was fixed in #77 . I updated the dependency on alia, from my quick tests it seems to work now.


You can get the latest version with the update using cc.qbits/alia "2.0.0-beta7"


Yeah I thought that too but no...

➜  datastore-search git:(feature/alia-async) ✗ lein repl
Retrieving cc/qbits/alia/2.0.0-beta7/alia-2.0.0-beta7.pom from clojars
Retrieving cc/qbits/alia/2.0.0-beta7/alia-2.0.0-beta7.jar from clojars
user=> (require '[qbits.alia :as alia] :reload)
user=> (require '[qbits.alia :as alia] :reload-all)

CompilerException java.lang.ClassCastException: cannot be cast to, compiling:(core.clj:181:20)

Sorry, coming to this late. Is there any AOT compilation going on?


Works for me.

; CIDER 0.5.0alpha (package: 20140114.202) (Clojure 1.5.1, nREPL 0.2.3)
user> (require '[qbits.alia :as alia] :reload)
user> (require '[qbits.alia :as alia] :reload-all)

As @ztellman said, maybe it's related to aot, or conflicting dependencies. try lein clean and also lein deps :tree looking for an older lamina version maybe.


Ok after a bunch of red herrings, I can confirm we did in fact have an AOT internal library and once AOT-ed problem went away. Seems to be potemkin and clojure AOT bugs related (this one?


Yep. Got my dependency list down to:

:dependencies [[org.clojure/clojure "1.6.0-alpha3"]
[com.smxemail/smx-netty-clout "1.0.10"]
[lamina "0.5.2"]])

Removed the AOT-ing of the main namespace in our SMX library and it's all good. So given that AOT and Clojure is busted, happy to close this ticket as resolved.

@coltnz coltnz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.