tools-deps

Drew Verlee 2023-03-28T04:55:18.438869Z

What is the difference between including a Clojure namespaces by adding them through deps.edn :deps as a :local/root vs adding them as a deps.edn :paths? I have some logic that's not reloaded as expected, and I'm guessing it's because the :local/root logic isn't part of the Clojure tools namespace and component reload flow.

Alex Miller (Clojure team) 2023-03-28T05:05:28.961709Z

Depends exactly what you mean, but either way they end up on your classpath, so no effective difference from that perspective. tools.namespace defaults to the dirs in your classpath, which should pull in local dep dirs too, but maybe there's something filtering those out

👀 1
Drew Verlee 2023-03-28T16:44:11.158239Z

@alexmiller thanks alex. do i need to tell clojure.tools.namespace.repl/set-refresh-dirs about the dirs that I'm pulling in through a local/root? Maybe i should revisit if i need to call the set-refresh-dirs fn at all.

Alex Miller (Clojure team) 2023-03-28T16:48:18.743409Z

I think you do need to tell it if you want it to refresh those :)

Alex Miller (Clojure team) 2023-03-28T16:48:49.561209Z

but maybe not calling it at all would be the same effect. I don't work in this mode so I'm not an expert in this

Drew Verlee 2023-03-28T16:57:51.441389Z

@alexmiller What mode do you mean? The one where i set which dirs to refresh? (as opposed to just all of them?) I'm using clojure tools namespace along side Component to overcome the "reloading woes" outlined https://lambdaisland.com/blog/2018-02-09-reloading-woes as well as those particles outlined by stuart sierra in his https://www.cognitect.com/blog/2013/06/04/clojure-workflow-reloaded" post.

Alex Miller (Clojure team) 2023-03-28T17:05:32.674259Z

I mean all of that :)