This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-16
Channels
- # beginners (7)
- # boot (63)
- # capetown (1)
- # cider (20)
- # clara (15)
- # cljs-dev (5)
- # clojure (195)
- # clojure-austria (2)
- # clojure-dev (46)
- # clojure-dusseldorf (9)
- # clojure-germany (6)
- # clojure-greece (36)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-russia (173)
- # clojure-sg (1)
- # clojure-spec (93)
- # clojure-uk (65)
- # clojure-ukraine (2)
- # clojured (9)
- # clojureremote (1)
- # clojurescript (52)
- # core-async (14)
- # core-logic (5)
- # cursive (21)
- # data-science (8)
- # datomic (60)
- # emacs (83)
- # jobs (9)
- # jobs-discuss (7)
- # juxt (6)
- # klipse (2)
- # leiningen (1)
- # lumo (24)
- # mount (4)
- # numerical-computing (1)
- # off-topic (18)
- # om (37)
- # om-next (5)
- # onyx (13)
- # pedestal (1)
- # perun (44)
- # proton (2)
- # rdf (3)
- # re-frame (24)
- # reagent (4)
- # remote-jobs (3)
- # spacemacs (3)
- # testing (6)
- # vim (10)
- # yada (2)
@arnout i was starting the system using this boot task:
(deftask refresh
"Reload all changed namespaces on the classpath.
Throws an exception in the case of failure."
[]
(with-pass-thru _
#_(apply tns/set-refresh-dirs (get-env :directories))
(->> ["src"]
(map abs-path)
(apply tns/set-refresh-dirs))
(with-bindings {#'*ns* *ns*
#'*e *e}
(mount/stop)
(let [result (tns/refresh :after 'mount/start)]
(when (instance? Throwable result)
(throw result))))))
but i haven't been able to reproduce the issue since, so i suspect it's an error related to how the code evolves. as states are being added and removed, occasionally throwing exceptions during reloading...
but i might throw this whole auto reload approach away and just use cursive's "Sync files in REPL ⇧⌘M"....
actually, i can't do that conveniently because if i move a symbol definition from a namespace to another, that causes exceptions, like this:
java.lang.IllegalStateException: gen already refers to: #'test-helpers/gen in namespace: app.users-test
clojure.lang.Compiler$CompilerException: java.lang.IllegalStateException: gen already refers to: #'test-helpers/gen in namespace: app.users-test, compiling:(app/users_test.clj:1:1)
im wondering then what is the use of that "sync files" in cursive then if it just does a (require .... :reload)
; which is not very convenient.
it seems i cant avoid clojure.tools.namespace.repl/refresh
😕