Re: Beginners question - emacs compiling tests
On Tuesday, March 19, 2013 4:22:59 PM UTC-7, John SJ Anderson wrote: I had this same issue when working through the tutorial. The text makes it sound like you should replace the entire contents of the test file, but that's not the case -- you just need to replace the (deftest ...) form. (I ended up having to generate the project tree under a slightly different name to get a good copy of the file back.) I have a similar issue, except that I did leave my file intact: (ns command-line-args.core-test (:require [clojure.test :refer :all] [command-line-args.core :refer :all])) (deftest pairs-of-values (let [args [--server localhost --port 8080 --environment production]] (is (= {:server localhost :port 8080 :environment production} (parse-args args) (defn parse-args [args] {}) Results in: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: parse-args in this context, compiling:(/Users/getchell/Projects/clojure/command-line-args/test/command_line_args/core_test.clj:12:12) at clojure.lang.Compiler.analyze (Compiler.java:6380) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3573) clojure.lang.Compiler.analyzeSeq (Compiler.java:6562) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3624) clojure.lang.Compiler.analyzeSeq (Compiler.java:6562) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.access$100 (Compiler.java:37) clojure.lang.Compiler$LetExpr$Parser.parse (Compiler.java:5973) clojure.lang.Compiler.analyzeSeq (Compiler.java:6560) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5708) clojure.lang.Compiler$TryExpr$Parser.parse (Compiler.java:2156) clojure.lang.Compiler.analyzeSeq (Compiler.java:6560) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5708) clojure.lang.Compiler$LetExpr$Parser.parse (Compiler.java:6009) clojure.lang.Compiler.analyzeSeq (Compiler.java:6560) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5708) clojure.lang.Compiler$FnMethod.parse (Compiler.java:5139) clojure.lang.Compiler$FnExpr.parse (Compiler.java:3751) clojure.lang.Compiler.analyzeSeq (Compiler.java:6558) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$MapExpr.parse (Compiler.java:2879) clojure.lang.Compiler.analyze (Compiler.java:6369) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$DefExpr$Parser.parse (Compiler.java:528) clojure.lang.Compiler.analyzeSeq (Compiler.java:6560) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler.eval (Compiler.java:6623) clojure.lang.Compiler.load (Compiler.java:7064) command_line_args.core_test$eval1168.invoke (NO_SOURCE_FILE:1) clojure.lang.Compiler.eval (Compiler.java:6619) clojure.lang.Compiler.eval (Compiler.java:6582) clojure.core$eval.invoke (core.clj:2852) clojure.main$repl$read_eval_print__6588$fn__6591.invoke (main.clj:259) clojure.main$repl$read_eval_print__6588.invoke (main.clj:259) clojure.main$repl$fn__6597.invoke (main.clj:277) clojure.main$repl.doInvoke (main.clj:277) clojure.lang.RestFn.invoke (RestFn.java:1096) clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__588.invoke (interruptible_eval.clj:56) clojure.lang.AFn.applyToHelper (AFn.java:159) clojure.lang.AFn.applyTo (AFn.java:151) clojure.core$apply.invoke (core.clj:617) clojure.core$with_bindings_STAR_.doInvoke (core.clj:1788) clojure.lang.RestFn.invoke (RestFn.java:425)
Re: Beginners question - emacs compiling tests
The 'parse-args' function needs to be inside of the 'core.clj' file, not the 'core_test.clj' file - is that the case? (The reason it is failing is the first usage of 'parse-args' is before it has been defined). On Fri, May 31, 2013 at 1:31 AM, Adam Getchell adam.getch...@gmail.comwrote: On Tuesday, March 19, 2013 4:22:59 PM UTC-7, John SJ Anderson wrote: I had this same issue when working through the tutorial. The text makes it sound like you should replace the entire contents of the test file, but that's not the case -- you just need to replace the (deftest ...) form. (I ended up having to generate the project tree under a slightly different name to get a good copy of the file back.) I have a similar issue, except that I did leave my file intact: (ns command-line-args.core-test (:require [clojure.test :refer :all] [command-line-args.core :refer :all])) (deftest pairs-of-values (let [args [--server localhost --port 8080 --environment production]] (is (= {:server localhost :port 8080 :environment production} (parse-args args) (defn parse-args [args] {}) Results in: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: parse-args in this context, compiling:(/Users/getchell/Projects/clojure/command-line-args/test/command_line_args/core_test.clj:12:12) at clojure.lang.Compiler.analyze (Compiler.java:6380) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3573) clojure.lang.Compiler.analyzeSeq (Compiler.java:6562) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3624) clojure.lang.Compiler.analyzeSeq (Compiler.java:6562) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.access$100 (Compiler.java:37) clojure.lang.Compiler$LetExpr$Parser.parse (Compiler.java:5973) clojure.lang.Compiler.analyzeSeq (Compiler.java:6560) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5708) clojure.lang.Compiler$TryExpr$Parser.parse (Compiler.java:2156) clojure.lang.Compiler.analyzeSeq (Compiler.java:6560) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5708) clojure.lang.Compiler$LetExpr$Parser.parse (Compiler.java:6009) clojure.lang.Compiler.analyzeSeq (Compiler.java:6560) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5708) clojure.lang.Compiler$FnMethod.parse (Compiler.java:5139) clojure.lang.Compiler$FnExpr.parse (Compiler.java:3751) clojure.lang.Compiler.analyzeSeq (Compiler.java:6558) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyzeSeq (Compiler.java:6548) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$MapExpr.parse (Compiler.java:2879) clojure.lang.Compiler.analyze (Compiler.java:6369) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler$DefExpr$Parser.parse (Compiler.java:528) clojure.lang.Compiler.analyzeSeq (Compiler.java:6560) clojure.lang.Compiler.analyze (Compiler.java:6361) clojure.lang.Compiler.analyze (Compiler.java:6322) clojure.lang.Compiler.eval (Compiler.java:6623) clojure.lang.Compiler.load (Compiler.java:7064) command_line_args.core_test$eval1168.invoke (NO_SOURCE_FILE:1) clojure.lang.Compiler.eval (Compiler.java:6619) clojure.lang.Compiler.eval (Compiler.java:6582) clojure.core$eval.invoke (core.clj:2852) clojure.main$repl$read_eval_print__6588$fn__6591.invoke (main.clj:259) clojure.main$repl$read_eval_print__6588.invoke (main.clj:259) clojure.main$repl$fn__6597.invoke (main.clj:277) clojure.main$repl.doInvoke (main.clj:277) clojure.lang.RestFn.invoke (RestFn.java:1096)
Re: Beginners question - emacs compiling tests
If you have a valid ns-form and still encounter that error, it may help to compile the file once using C-c C-k. I still need to do that (sometimes?) when I open a file in Emacs although I'd thought, that the complete project should have been loaded at REPL start. After that compilation of single tests (e.g. using C-M-x) should be working. Best, Stefan -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Beginners question - emacs compiling tests
This problem was cross-posted over here from StackOverflowhttp://stackoverflow.com/questions/15508152/beginners-emacs-clojure-compiling-error, where it has already been marked as solved. BTW where do you encounter your problem? Inside emacs, with nrepl.el? Because nrepl.el doesn't automatically compile anything; if you start the repl with *lein repl*, it will get compiled by the built-in repl client, and the effects will be observed within emacs. This is more of a side-effect than by-design. If you, however, start with *lein repl :headless*, nothing happens (this will improve with Leiningen 2.1). For any of this to work you need a *:main ...* or *:repl-options {:init ns ...}* declaration in project.clj. Finally, only the indicated main namespace (and its dependencies) will be loaded; the test namespace will once again stay unloaded because the main code doesn't depend on the test code. -marko On Wednesday, March 20, 2013 9:28:52 AM UTC+1, Stefan Kamphausen wrote: If you have a valid ns-form and still encounter that error, it may help to compile the file once using C-c C-k. I still need to do that (sometimes?) when I open a file in Emacs although I'd thought, that the complete project should have been loaded at REPL start. After that compilation of single tests (e.g. using C-M-x) should be working. Best, Stefan -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Beginners question - emacs compiling tests
Hi, On Wednesday, March 20, 2013 9:44:19 AM UTC+1, Marko Topolnik wrote: This problem was cross-posted over here from StackOverflowhttp://stackoverflow.com/questions/15508152/beginners-emacs-clojure-compiling-error, where it has already been marked as solved. oh, sorry, didn't know that. BTW where do you encounter your problem? Inside emacs, with nrepl.el? Yes. Because nrepl.el doesn't automatically compile anything; if you start the repl with *lein repl*, This is what I ususally do. Then connect using M-x nrepl. Sometimes I quickly launch the JVM using M-x nrepl-jack-in which makes no difference. it will get compiled by the built-in repl client, and the effects will be observed within emacs. This is more of a side-effect than by-design. To it seems obvious, that I want my complete project loaded and waiting for my new changes, when I launch a REPL. Maybe that's a leftover from my Common Lisp days? Why would I want to hit C-c C-k every time I open one of the files in my project? If you, however, start with *lein repl :headless*, nothing happens (this will improve with Leiningen 2.1). Never used that. Cheers, Stefan -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Beginners question - emacs compiling tests
On Wednesday, March 20, 2013 10:39:34 AM UTC+1, Stefan Kamphausen wrote: To it seems obvious, that I want my complete project loaded and waiting for my new changes, when I launch a REPL. Maybe that's a leftover from my Common Lisp days? Why would I want to hit C-c C-k every time I open one of the files in my project? Because you usually don't want to wait the eternity it takes to compile and load absolutely everything. Even loading just the main namespace can be painfully slow, even if your project is just a few lines, due to the hugeness of the whole dependency tree. -marko -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Beginners question - emacs compiling tests
On Wednesday, March 20, 2013 10:44:15 AM UTC+1, Marko Topolnik wrote: Because you usually don't want to wait the eternity it takes to compile and load absolutely everything. Even loading just the main namespace can be painfully slow, even if your project is just a few lines, due to the hugeness of the whole dependency tree. Sounds like my method of work is different :-) Stefan -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Beginners question - emacs compiling tests
As Marko has said, this was answered on stackoverflow. But I appreciate your answers, and the discussion is a joy to read. Cheers!! -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Beginners question - emacs compiling tests
I'm going through clojure emacs tutorial from clojure-doc.org, and when compiling the test as suggested, i get following output in emacs nrepl: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: deftest in this context, compiling:(/home/jakov/dev/PROJECTS/clojure/test2/test/test2/ core_test.clj:1) Compiler.java:6281 clojure.lang.Compiler.analyze Compiler.java:6223 clojure.lang.Compiler.analyze Compiler.java:3497 clojure.lang.Compiler $InvokeExpr.parse Compiler.java:6457 clojure.lang.Compiler.analyzeSeq Compiler.java:6262 clojure.lang.Compiler.analyze Compiler.java:6223 clojure.lang.Compiler.analyze Compiler.java:6515 clojure.lang.Compiler.eval Compiler.java:6952 clojure.lang.Compiler.load Compiler.java:6912 clojure.lang.Compiler.loadFile RT.java:307 clojure.lang.RT$3.invoke NO_SOURCE_FILE:1 user/eval42 Compiler.java:6511 clojure.lang.Compiler.eval Compiler.java:6477 clojure.lang.Compiler.eval core.clj:2797 clojure.core/eval main.clj:245 clojure.main/repl[fn] main.clj:266 clojure.main/repl[fn] main.clj:266 clojure.main/repl RestFn.java:1096 clojure.lang.RestFn.invoke interruptible_eval.clj:56 clojure.tools.nrepl.middleware.interruptible-eval/evaluate[fn] AFn.java:159 clojure.lang.AFn.applyToHelper AFn.java:151 clojure.lang.AFn.applyTo core.clj:601 clojure.core/apply core.clj:1771 clojure.core/with-bindings* RestFn.java:425 clojure.lang.RestFn.invoke interruptible_eval.clj:41 clojure.tools.nrepl.middleware.interruptible-eval/evaluate interruptible_eval.clj:171 clojure.tools.nrepl.middleware.interruptible-eval/interruptible- eval[fn] core.clj:2278 clojure.core/comp[fn] interruptible_eval.clj:138 clojure.tools.nrepl.middleware.interruptible-eval/run-next[fn] AFn.java:24 clojure.lang.AFn.run ThreadPoolExecutor.java:895 java.util.concurrent.ThreadPoolExecutor$Worker.runTask ThreadPoolExecutor.java:918 java.util.concurrent.ThreadPoolExecutor$Worker.run Thread.java:662 java.lang.Thread.run Caused by: java.lang.RuntimeException: Unable to resolve symbol: deftest in this context Util.java:170 clojure.lang.Util.runtimeException Compiler.java:6766 clojure.lang.Compiler.resolveIn Compiler.java:6710 clojure.lang.Compiler.resolve Compiler.java:6671 clojure.lang.Compiler.analyzeSymbol Compiler.java:6244 clojure.lang.Compiler.analyze To me, it seems like this line is crucial in the nrepl error output: Caused by: java.lang.RuntimeException: Unable to resolve symbol: deftest in this context Anyway, i am really a clojure emacs noob, and I dont have much clue here. All the emacs slime clojure stuff is installed, `leiningen2` is installed, java is oracle java 1.6, emacs is emacs 24, and when I run lein test in projects directory, it goes without errors. Can anyone help me? My core_test.clj file: (deftest pairs-of-values (let [args [--server localhost --port 8080 --environment production]] (is (= {:server localhost :port 8080 :environment production} (parse-args args) My core.clj file: (defn parse-args [args] {}) -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Beginners question - emacs compiling tests
It looks like you're missing (ns ...) forms at the top of each file. That tutorial doesn't show them, but lein would have generated them for you when it generated the project. The key element is that your test file should have a (:use clojure.test) in the (ns) form, which is what allows you to use clojure.test/deftest without namespace-qualification. On Tue, Mar 19, 2013 at 2:12 PM, tyaakow tyaa...@gmail.com wrote: I'm going through clojure emacs tutorial from clojure-doc.org, and when compiling the test as suggested, i get following output in emacs nrepl: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: deftest in this context, compiling:(/home/jakov/dev/PROJECTS/clojure/test2/test/test2/ core_test.clj:1) Compiler.java:6281 clojure.lang.Compiler.analyze Compiler.java:6223 clojure.lang.Compiler.analyze Compiler.java:3497 clojure.lang.Compiler $InvokeExpr.parse Compiler.java:6457 clojure.lang.Compiler.analyzeSeq Compiler.java:6262 clojure.lang.Compiler.analyze Compiler.java:6223 clojure.lang.Compiler.analyze Compiler.java:6515 clojure.lang.Compiler.eval Compiler.java:6952 clojure.lang.Compiler.load Compiler.java:6912 clojure.lang.Compiler.loadFile RT.java:307 clojure.lang.RT$3.invoke NO_SOURCE_FILE:1 user/eval42 Compiler.java:6511 clojure.lang.Compiler.eval Compiler.java:6477 clojure.lang.Compiler.eval core.clj:2797 clojure.core/eval main.clj:245 clojure.main/repl[fn] main.clj:266 clojure.main/repl[fn] main.clj:266 clojure.main/repl RestFn.java:1096 clojure.lang.RestFn.invoke interruptible_eval.clj:56 clojure.tools.nrepl.middleware.interruptible-eval/evaluate[fn] AFn.java:159 clojure.lang.AFn.applyToHelper AFn.java:151 clojure.lang.AFn.applyTo core.clj:601 clojure.core/apply core.clj:1771 clojure.core/with-bindings* RestFn.java:425 clojure.lang.RestFn.invoke interruptible_eval.clj:41 clojure.tools.nrepl.middleware.interruptible-eval/evaluate interruptible_eval.clj:171 clojure.tools.nrepl.middleware.interruptible-eval/interruptible- eval[fn] core.clj:2278 clojure.core/comp[fn] interruptible_eval.clj:138 clojure.tools.nrepl.middleware.interruptible-eval/run-next[fn] AFn.java:24 clojure.lang.AFn.run ThreadPoolExecutor.java:895 java.util.concurrent.ThreadPoolExecutor$Worker.runTask ThreadPoolExecutor.java:918 java.util.concurrent.ThreadPoolExecutor$Worker.run Thread.java:662 java.lang.Thread.run Caused by: java.lang.RuntimeException: Unable to resolve symbol: deftest in this context Util.java:170 clojure.lang.Util.runtimeException Compiler.java:6766 clojure.lang.Compiler.resolveIn Compiler.java:6710 clojure.lang.Compiler.resolve Compiler.java:6671 clojure.lang.Compiler.analyzeSymbol Compiler.java:6244 clojure.lang.Compiler.analyze To me, it seems like this line is crucial in the nrepl error output: Caused by: java.lang.RuntimeException: Unable to resolve symbol: deftest in this context Anyway, i am really a clojure emacs noob, and I dont have much clue here. All the emacs slime clojure stuff is installed, `leiningen2` is installed, java is oracle java 1.6, emacs is emacs 24, and when I run lein test in projects directory, it goes without errors. Can anyone help me? My core_test.clj file: (deftest pairs-of-values (let [args [--server localhost --port 8080 --environment production]] (is (= {:server localhost :port 8080 :environment production} (parse-args args) My core.clj file: (defn parse-args [args] {}) -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit
Re: Beginners question - emacs compiling tests
On Tue, Mar 19, 2013 at 3:02 PM, John D. Hume duelin.mark...@gmail.com wrote: It looks like you're missing (ns ...) forms at the top of each file. That tutorial doesn't show them, but lein would have generated them for you when it generated the project. The key element is that your test file should have a (:use clojure.test) in the (ns) form, which is what allows you to use clojure.test/deftest without namespace-qualification. I had this same issue when working through the tutorial. The text makes it sound like you should replace the entire contents of the test file, but that's not the case -- you just need to replace the (deftest ...) form. (I ended up having to generate the project tree under a slightly different name to get a good copy of the file back.) good luck. j. -- -- 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 --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.