I have a problem compiling .clj
files which reside in a project where I run the nREPL server process:
lein new xxx
. lein repl
. lein repl :connect localhost:12345/repl
.I created a simple namespace file and saved it inside the project in the appropriate location:
(ns remote.one)
(def foo 42)
Now on the client terminal I called this function
(compile 'remote.one)
I've got the below exception:
CompilerException java.lang.ClassNotFoundException: remote.one, compiling:(C:\Users\xxx\AppData\Local\Temp\form-init2429492334116477513.clj:1:1)
Now I would have expected the compile call to be executed in the server not on the client. Can it be done at all?
Thanks
I just tried it and it worked for me. What happened the first time I tried it was that I missed a step: setting the current directory as the project's. I see that this step is also missing from your description, maybe that's the reason it doesn't work in your case.
lein new remote
.cd remote
.lein repl :headless
(which I realize now is also different from your description).lein repl :connect localhost:port/repl
in ~/.
.~/remote/src/remote/one.clj
.(compile 'remote.one)
.(Using Leiningen 2.3.4 on Java 1.7.0 Java HotSpot(TM) 64-Bit Server VM
and Clojure 1.5.1
).