mount

timo 2020-11-23T15:59:06.015700Z

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.

timo 2020-11-23T15:59:12.015900Z

Any ideas on why that is?

timo 2020-11-23T16:01:11.016500Z

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

timo 2020-11-23T16:22:32.016800Z

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

timo 2020-11-23T16:24:04.018300Z

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

timo 2020-11-23T16:25:12.019400Z

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