usually, depending on the app, you would have the first ns
where everything is started from. it can be a handler for web apps, or -main
, or something else
I suspect the actual placement would not matter in cljs
, since it will become one big file anyway, but it would depend on whether the goog.require
s precede the expanded version of defstate
the idea is to let compiler know to compile mount sources before using defstate
@tolitius: Hm. I tried putting (:require [mount.core])
only in my main mount-question.core
ns which :refer
s the other one where the warning occurs (`mount-question.config` in the minimal example) ... and the warning appears. But if I move (:require [mount.core])
back to mount-question.config
ns instead, it's happy. In my real app, config
is the bottom-most dependency that everyone else ultimately relies on. So it looks like putting it in the main ns is not as 'early' as putting it in the bottom-most ns that needs to be defined first?
@fappy: that's because mount-question.core
requires mount-question.config
, which makes the compiler to compile config
first