You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lein-test-refresh version 0.19.0
Lein version: Leiningen 2.7.1 on Java 1.8.0_111
Clojure 1.8.0
lein-test-refresh seems to recursively load all *.clj files instead of just those found on :source-paths and :test-paths from project.clj. This causes clashes when files that are not supposed to be in the build are attempted to be loaded/compiled.
The text was updated successfully, but these errors were encountered:
cloojure
changed the title
Need to respect :source-paths and :test-paths
Need to respect :source-paths and :test-pathsApr 4, 2017
cloojure
changed the title
Need to respect :source-paths and :test-paths
Need to respect :source-paths and :test-paths from project.clj
Apr 4, 2017
The current behavior exists since test-refresh calls tools.namespace to refresh and by default it refreshes everything on the classpath.
A :refresh-dirs option was added a while ago to test-refresh which allows users to specify which directories should be refreshed by specifying the arguments to tools.namespace.repl/set-refresh-dirs. There is a similar :watch-dirs option for specifying what directories should be monitored for changes.
I'm having a hard time remembering why this was done instead of looking at source/test paths by default. I'm going to have to think about this and see any pros and cons of the two approaches bubble up. The thing that first popped into my head is that the current behavior of reloading the entire classpath plays nicely with Leiningen checkouts.
In the meantime, you can work around the problem you're seeing by using :refresh-dirs. Thanks for submitting the issue.
lein-test-refresh version 0.19.0
Lein version: Leiningen 2.7.1 on Java 1.8.0_111
Clojure 1.8.0
lein-test-refresh seems to recursively load all *.clj files instead of just those found on
:source-paths
and:test-paths
fromproject.clj
. This causes clashes when files that are not supposed to be in the build are attempted to be loaded/compiled.The text was updated successfully, but these errors were encountered: