problem running tests in leiningen

2011-05-06 Thread Islon Scherer
I have a lein project and I'm trying to run my tests with lein test.
The first problem I had was a class not found error in one of my
records
so I put aot: [namespace.name] in project.clj.
It's required that I put all namespaces that contain defrecords/
deftypes in the aot list?

After that I tried to run the tests again and got a different error:
Exception in thread main java.lang.ClassNotFoundException:
clojure.pprint
Inside lein swank this code runs and compiles with no problems, do
lein
execute tests with a different clojure(and/or contrib) version?

This is my project.clj

(defproject mediaretriever 1.0.0-SNAPSHOT
  :description ...
  :dependencies [[org.clojure/clojure 1.2.1]
 [org.clojure/clojure-contrib 1.2.0]
 [enlive 1.0.0]
 [clj-http 0.1.3]
 [clj-time 0.3.0]]
  :dev-dependencies [[swank-clojure 1.3.0]]
  :aot [mediaretriever.media])

Any help is appreciated.
Regards
Islon

-- 
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


Re: problem running tests in leiningen

2011-05-06 Thread Stuart Halloway
 I have a lein project and I'm trying to run my tests with lein test.
 The first problem I had was a class not found error in one of my
 records
 so I put aot: [namespace.name] in project.clj.
 It's required that I put all namespaces that contain defrecords/
 deftypes in the aot list?

This should not be a requirement. However, you might need to require the 
namespace containing the class before using the class.

 After that I tried to run the tests again and got a different error:
 Exception in thread main java.lang.ClassNotFoundException:
 clojure.pprint
 Inside lein swank this code runs and compiles with no problems, do
 lein
 execute tests with a different clojure(and/or contrib) version?

The standard Clojure repl uses some utility fns from non-core namespaces. 
Specifically:

 ;; from main.clj
 (use '[clojure.repl :only (source apropos dir pst doc find-doc)])
 (use '[clojure.java.javadoc :only (javadoc)])
 (use '[clojure.pprint :only (pp pprint)])

When you run code outside the REPL, you will need to use these specifically if 
you need them.

Hope this helps.

Stu


Stuart Halloway
Clojure/core
http://clojure.com

-- 
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

Re: problem running tests in leiningen

2011-05-06 Thread Islon Scherer
Thanks Stuart, the tests are working now.

On May 6, 12:16 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
  I have a lein project and I'm trying to run my tests with lein test.
  The first problem I had was a class not found error in one of my
  records
  so I put aot: [namespace.name] in project.clj.
  It's required that I put all namespaces that contain defrecords/
  deftypes in the aot list?

 This should not be a requirement. However, you might need to require the 
 namespace containing the class before using the class.

  After that I tried to run the tests again and got a different error:
  Exception in thread main java.lang.ClassNotFoundException:
  clojure.pprint
  Inside lein swank this code runs and compiles with no problems, do
  lein
  execute tests with a different clojure(and/or contrib) version?

 The standard Clojure repl uses some utility fns from non-core namespaces. 
 Specifically:

      ;; from main.clj
      (use '[clojure.repl :only (source apropos dir pst doc find-doc)])
      (use '[clojure.java.javadoc :only (javadoc)])
      (use '[clojure.pprint :only (pp pprint)])

 When you run code outside the REPL, you will need to use these specifically 
 if you need them.

 Hope this helps.

 Stu

 Stuart Halloway
 Clojure/corehttp://clojure.com

-- 
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