Fork me on GitHub
#mount
<
2020-11-23
>
timo15:11:06

Hi, I am using a new Luminus project with mount and having a problem here. The log output shows clearly that config/env is started before handler/init-app and handler/app-routes but when I am using the state env in a middleware it is nil. When reloading the namespace and restarting the states it works perfectly fine.

timo15:11:12

Any ideas on why that is?

timo16:11:11

Is it lazy loading? because it seems so. but I am not using cljc mode afaik

timo16:11:32

#object[mount.core.DerefableState 0x3e11996e {:status :pending, :val nil}]

timo16:11:04

If I do lein new luminus temp +reitit +datomic +cljs +re-frame +shadow-cljs +swagger +auth-jwe +kibit and then go to src/clj/temp/middleware/formats.clj require temp.config and then insert a (println config/env) I am only getting the above DerefableState

timo16:11:12

I don't get why. The docs are saying that this should only occur when this is lazy loading. but it should not lazy load. there is no (mount/in-cljc-mode) in the code