Fork me on GitHub

How do i re-evaluate a function in another namespace without going to it?


You mean without going to the file? Not really in any way. Even if you used some kind of a watch process, you would need to go to the file to save it. But why would you need to re-evaluate it, if it hasn't changed? Or how can it changed, without going there with the editor? Something external changing it?


I'm using calva and i jack-in to leiningen then evaluate this snippet to get my app running

    (init-logger db log-file-name)
    (def srvr (atom (jetty/run-jetty #'app {:port 8778 :join? false}))))
Once its running any change i make does not take effect till i re-evaluate #'app which as you rightly noted is in another file. So i keep hopping back and forth.


Well, you have a multi file dependency path. The options either are that you manually go re-evaluate the dependency chain, you restart the repl, or you automate the re-evaluation

Hukka14:09:45 and similar are systems that watch for changes, and can see which namespaces depend on the file that change, and recursively reload them all


There are custom commands as well.


Sure, you could make the above options a bit more ergonomic in Calva. But still the problem is more general (perhaps "larger"?) than calva or editors in general.


More precisely ring handler