Open andreasthoelke opened 8 years ago
This might be related to Clojure's 1.8's direct linking. Have you tried with ^:redef
or ^:dynamic
?
@circlespainter Thank you for the quick response!
I tried reloading
(defsfn ^:redef a1 []
(receive
:ab (println "two")))
and
(defsfn ^:dynamic a1 []
(receive
:ab (println "two")))
in clojure 1.8.0 and 1.7.0, but got the same behaviour as above.
While testing I noticed I can reload this in clojure 1.8.0 and 1.7.0!:
(def b1 (sfn []
(receive
:ab (println "three"))))
This should solve my immediate problem using Pulsar with the Component lib/reloaded workflow. Will test this now..
Just to confirm, as expected (def a (sfn [] ...)
works fine with component/reloaded workflow, while (defsfn a [] ..)
doesn't.
This doesn't happen with non-matching receives ((receive)
).
Thank you for Pulsar, it looks amazing!
It seems I can't reload suspendable functions in the REPL. Entering this in the REPL works as expected (printing "one"):
However when entering the expressions again (slightly changed) (or alternatively calling
(clojure.tools.namespace.repl/refresh)
), I won't see a result printed:I'm using