Hi, On day 3 of a new clj-kit app. All of a sudden, wrap-reload and wrap-refresh stopped working. What possibly can go wrong. Is there a way to enable any tracing or error logging.
I see a message Stopping existing deps.Edn watchers I don’t think I saw this earlier
see a message where? neither wrap-reload or wrap-refresh doing anything with deps.edn. Seems suspicious that it says deps.Edn and not deps.edn
Iphone auto corrected the e to E
The message is in the repl window
I would double check if reloading is actually happening, but you just are not seeing updated behaviors (if you put a println at the top of the file does the printing happen when reloading should occur)
if that is the case likely you are capturing a function value in your route definition somewhere instead of keeping a mutable reference that can be updated (exactly how this happens and what to do about it will depend on how you are doing routing)
https://cljdoc.org/d/metosin/reitit/0.5.18/doc/advanced/dev-workflow?q=reload#an-example has some discussion of that kind of thing for reitit
Thank you.
The dev workflow setup you mentioned is already there in my code as it is part of clj-kit template code.
I had to change ["/" {:get home}] to ["/" {:get #(home %)}]`` to see changes made to value of :a
in home handler function below.
I still can't get wrap-refresh to work though
(defn home [request]
(layout/render request "home.html" {:a 9}))
;; Routes
(defn page-routes [_opts]
[["/" {:get #(home %) }]])
The dev workflow setup you mentioned is already there in my code as it is part of clj-kit template code.
My code is based on https://github.com/clojurestream/kit-workshop?tab=readme-ov-file#routing