BetterThanTomorrow / calva

Clojure & ClojureScript Interactive Programming for VS Code
https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva
Other
1.61k stars 213 forks source link

Option for evalOnSave to reload all affected namespaces per dependency graph #965

Open stefan-toubia opened 3 years ago

stefan-toubia commented 3 years ago

Currently evalOnSave uses nrepl load-file to evaluate a single file to the repl. This works in many cases, but there are some issues with this:

Proposal

Use clojure.tools.namespace.repl to evaluate modified namespaces based on the dependency graph. Supposedly cider-ns-refresh can be used here.

I'm personally not as familiar with the clojure.tools.namespace.repl lib as we're using weavejester/ns-tracker but the idea seems the same.

Related Reading:

https://practicalli.github.io/spacemacs/clojure-repl/refresh-restart-repl.html#issues-with-clojure-reload

PEZ commented 3 years ago

Cursive does this, I've been told.