CLJX > Now autotest and clojure.tools.namespace.repl/refresh don't work
markmandel opened this issue · comments
Not sure what is going on, but need to fix this.
I've noticed that now we have cljx, if I run (autotest)
from the repl, then when files change on the file system (I'm usually running lein cljx auto
at the same time), it will re-run the tests, but it doesn't load any changes in the files.
Ditto for when I refresh
or refresh-all
from tools.namespace.repl.
Loading the files into the REPL is fine, but I'm very used to my workflow with autotest and refresh, so I don't want to lose that.
@Janiczek you seen this one before?
Well, one thing I see there is (set-refresh-src!) and (set-refresh-all!) don't look into /target/generated/{src,test}/clj but into /{src,test}
What I've tested:
$ lein cljx auto
# in other terminal
$ lein repl
user=> (set-refresh-dirs "./target/generated/src/clj" "./dev")
("./target/generated/src/clj" "./dev")
user=> (autotest)
;; blablabla
All checks (52) succeeded.
user=>
Then in other window I changed create-uuid to always return "abc" (that should fail some tests).
When I saved:
user=>
;;; blablabla
FAILURE: 3 checks failed. (But 23 succeeded.)
refresh
and refresh-all
also seem to work for me. Maybe the offending part is really the old path in dev/user.clj
?
Thanks for looking into it. That looks like a nice find! I'll have a go with it tomorrow.