jakemcc / test-refresh

Refreshes and reruns clojure.tests in your project.
393 stars 28 forks source link

REPL #38

Closed donbonifacio closed 9 years ago

donbonifacio commented 9 years ago

Is there a way to have this running on a repl? At this moment I have lein test-refresh running and also lein repl running. Can I launch test-refresh on the repl and use only one instance?

jakemcc commented 9 years ago

There currently isn't a way. Originally I thought including test-refresh as a dependency and calling the com.jakemccrary.test-refresh/monitor-project function might be enough but it isn't. While it did start monitoring the project it makes the repl useless as it never returns.

It might not be to difficult of a change to add in a function that causes project monitoring and test running to happen in a background thread. I'm not sure if that is all that would need to be done though.

I'd be a bit concerned about test-refresh refreshing namespaces in the same REPL environment that I'm working in. I can imagine situations when you would lose your some state because of a refresh.

donbonifacio commented 9 years ago

I have to agree, this suggestion might bring some problems, and there are some other plugins that auto reload code on the repl if users really want that.

jakemcc commented 9 years ago

Sounds good. Going to close this then. I'm open to PRs adding functionality if others want it. Thanks for the suggestion.