If you have a
deps.edn project with a git dep in it, in a project where you're also using
clojure.tools.namespace.repl/refresh then by default the
refresh call will load and refresh all the clojure namespaces in your git dep.
I think it does this because prior to tools.deps; essentially all library dependencies were distributed as jars, so it would assume that any directories in the classpath contain your projects source code, and would benefit from reloading via refresh.
This assumption changes in
tools.deps projects as deps can now be stored as files on the filesystem in the
~/.gitlibs directory. These deps are essentially mistaken as project dependencies, and are all loaded and refreshed, even if your project does not actually
~/.gitlibs are versioned and intended to be immutable, arguably it doesn't make sense to automatically require and refresh them.
It is quite easily avoided by including a call to explicitly set your projects refresh-dirs with something like:
(tnsrepl/set-refresh-dirs "src" "test"), however I wonder if it would be better for tools.namespace to exclude anything under
~/.gitlibs by default, as tools.namespace's starting/default assumption no longer holds.
NOTE this is also likely related to this issue.