Fork me on GitHub
#mount
<
2017-01-16
>
tianshu04:01:55

I think my code is almost the same:

(ns caiba-data.nrepl
  (:require [mount.core :as mount :refer [defstate]]
            [clojure.tools.nrepl.server :refer [start-server stop-server]]))

(defn start-nrepl []
  (start-server :bind "0.0.0.0" :port 7888))

(defstate nrepl
  :start (start-nrepl)
  :stop (stop-server nrepl))
and I use mount/start in my core ns. other state works fine, except nrepl.

tianshu04:01:32

BTW, If I just use start-nrepl, it works fine.

tolitius14:01:50

the exception is coming from db.clj line 13

tolitius14:01:43

what is that line, and do you have requires in that namespace?

tolitius14:01:59

if you can create an example (with all ns involved) that I can look at, it'll be easier for me to help