tolitius / mount

managing Clojure and ClojureScript app state since (reset)
Eclipse Public License 1.0
1.22k stars 88 forks source link

[ClojureScript] Throwing in a start does show exception #100

Open arichiardi opened 5 years ago

arichiardi commented 5 years ago

Hi @tolitius I have encountered this problem in the latest mount:

# from the mount repo do:

$ lumo -c src
Lumo 1.8.0
ClojureScript 1.9.946
Node.js v9.2.0
 Docs: (doc function-name-here)
       (find-doc "part-of-name-here")
 Source: (source function-name-here)
 Exit: Control+D or :cljs/quit or exit

cljs.user=> (require '[mount.core :refer-macros [defstate]])
nil
cljs.user=> (require '[cljs.spec.alpha :as s])
nil
cljs.user=> (defstate a-config :start (s/assert* keyword? "string"))
#'cljs.user/a-config
cljs.user=> @a-config

cljs.user=> 

I would have expected the exception to be thrown but I don't see anywhere. If I use a function instead of a form for :start, everything works.

tolitius commented 5 years ago

should be good in 0.1.14-SNAPSHOT thanks for reporting this