integrant

2020-10-27T04:44:06.030600Z

Hi @ericihli You can try to replace your .dirs-local content with this:

((nil . ((cider-refresh-before-fn . "integrant.repl/suspend")
         (cider-refresh-after-fn . "integrant.repl/resume"))))

Eric Ihli 2020-10-27T11:43:59.034600Z

I did try that. Does that need to be paired with certain code in ig/init-suspend / ig/init-resume? Because I was seeing the same behavior. Cider reported suspending resuming just fine but website wasn't noticing changes.

2020-10-27T13:52:37.036700Z

@ericihli Yes in fact I was planning it a bit because behnind suspend / resume, it's halt / init in the end. There must have another misconfiguration. Maybe sharing a code snippet of your config definition can help ?

2020-10-27T13:55:50.037200Z

If you call (reset) from the REPL, is it working?

Eric Ihli 2020-10-27T14:43:58.038400Z

The config is at https://gist.github.com/eihli/caf8ef17c1e489ba7c38e09367bde51b I'll check again on (reset) in a bit. If I remember correctly, it was working when I called (reset) from the repl but when I tried to set that as the cider-ns-refresh-after-fn I was getting an error about not being able to set *ns* binding outside of something or another. I think the solution to the error would have been what I see in the duct.core.repl code.

(defn- auto-reset-handler [ctx event]
  (binding [*ns* *ns*]
    (integrant.repl/reset)
    ctx))

2020-10-27T16:44:19.040500Z

@ericihli I see a typo here https://gist.github.com/eihli/caf8ef17c1e489ba7c38e09367bde51b#file-example-clj-L46 The server doesn't stopping in when halting. Try after replacing (server with (.stop server)

2020-10-27T16:48:14.042100Z

You can also check my repo here who also using .dir-locals.el file and Integrant reloaded workflow https://github.com/PrestanceDesign/usermanager-reitit-integrant-example

Eric Ihli 2020-10-27T16:51:47.043400Z

Ohhh interesting. But... I thought to stop an http-kit server you just called it. http://http-kit.github.io/server.html#stop-server Yeah. > run-server returns a function that stops the server, which can take an optional timeout(ms) param to wait for existing requests to be finished.