Fork me on GitHub
#boot
<
2017-11-26
>
qqq07:11:09

I have a build.boot configured as such:

(deftask learning-dev []
  (comp
   (repl :port 4001)
   (fn [next]
     (fn [fileset] 
       (require 'server.ss-web :reload)
       ((var-get (resolve 'server.ss-web/launch-dev)))
       (next fileset))) 
   (watch)
   (fn [next]
     (fn [fileset]
       (require 'server.ss-web :reload)))))
the problem is that on an error loadikng a namesapce, the repl dies is there a way to try/catch this, so that on error, it displays the error, but the repl stays alive ?

freakinruben10:11:48

never tried to start repl-client in a boot task, but I usually have repl running as server and it never dies because of ns error.. (repl :server true :port 4001)

qqq22:11:18

(deftask learning-dev []
  (comp
   (repl :port 4001) 
   (watch)
   (fn [next]
     (fn [fileset] 
       (require 'clojure.tools.namespace.repl)
       ((resolve 'clojure.tools.namespace.repl/refresh))))))
is giving me:
java.lang.IllegalStateException: Can't set!: *ns* from non-binding thread
how do . fix this, and how do I do this on a binding thread ?