Howard Lewis Ship <hls...@gmail.com> writes:

> I have main my code in package folders under src/main/clojure, and my
> tests under src/test/clojure ... and I need src/main/resources and
> src/test/resources on the classpath as well.
>
> I'm wondering what other people do to manage these issues.  Currently,
> I'm using Ant to run my tests, but doing anything in the REPL is hard,
> as I have to carefully load my namespaces in the right order, as they
> can't be resolved automatically (as that is dependent on having the
> classpath set up correctly).

I use the clojure-project function to launch slime; it sets up the
classpath according to my project conventions:

http://github.com/technomancy/emacs-starter-kit/blob/a46328f2ad0cb437bf22aaf42f4f25f53126102f/starter-kit-lisp.el#L104

As long as you unpack your deps all in one place and stick to the same
classpath conventions, the fact that you can't change the classpath at
runtime is not a significant problem.

For running tests, I wrote clojure-test-mode:

http://github.com/technomancy/clojure-mode/blob/ef9556612617c5cf0a14bb9f9e2cc03c3b51b465/clojure-test-mode.el

(This hasn't been updated to reflect the move of test-is -> clojure.test
yet; patches welcome.)

It will run tests in-process via SLIME. Of course, you can't rely on
this solely because your results can be affected by a "dirty JVM", so
it's important to do a sanity-check with a fresh instance before each
check-in. But running in SLIME speeds up the test-implement-refactor
rhythm pretty significantly for me at least.

-Phil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to