swannodette / textmate-clojure

TextMate bundle for Clojure
91 stars 25 forks source link

Evaluation fails :( #8

Closed adinapoli closed 14 years ago

adinapoli commented 14 years ago

Hi, I've installed cake as well as the Clojure bundle. If I create even the simplest clojure file in the world, when I try to eval (ctrl + x) I get this:

clojure.lang.Compiler$CompilerException: java.lang.NullPointerException (eval_last_sexpr.clj:0) at clojure.lang.Compiler.eval (Compiler.java:5440) clojure.lang.Compiler.load (Compiler.java:5857) clojure.lang.Compiler.loadFile (Compiler.java:5820) clojure.lang.RT$3.invoke (RT.java:296) cake.server$run_file.invoke (server.clj:94) cake.server$create$fn728$fn735.invoke (server.clj:133) cake.server$create$fn728.invoke (server.clj:115) cake.utils.server_socket$accept_fn$fn404$fn407.invoke (server_socket.clj:39) cake.utils.server_socket$accept_fn$fn404.invoke (server_socket.clj:38) clojure.lang.AFn.run (AFn.java:24) java.lang.Thread.run (Thread.java:637) Caused by: java.lang.NullPointerException: null at clojure.core$eval2463.invoke (eval_last_sexpr.clj:3) clojure.lang.Compiler.eval (Compiler.java:5424) clojure.lang.Compiler.load (Compiler.java:5857) clojure.lang.Compiler.loadFile (Compiler.java:5820) clojure.lang.RT$3.invoke (RT.java:296) cake.server$run_file.invoke (server.clj:94) cake.server$create$fn728$fn735.invoke (server.clj:133) cake.server$create$fn728.invoke (server.clj:115) cake.utils.server_socket$accept_fn$fn404$fn407.invoke (server_socket.clj:39) cake.utils.server_socket$accept_fn$fn404.invoke (server_socket.clj:38) clojure.lang.AFn.run (AFn.java:24) java.lang.Thread.run (Thread.java:637)

Why? :( Regards, A.

aria42 commented 14 years ago

Where is the cursor and what is the form you're trying to evaluate? ctr+x will evaluate the form before the cursor. There is a known issue with set literals, but should work for everything else. What form are you evaling? Is the curso right at the closing delimeter?

adinapoli commented 14 years ago

This is a simple evalutation:

(+ 2 5)

Now if I try ctrl+x I always obtain:

[cake] connection to bake jvm is taking a long time... [cake] you can use ^C to abort and use 'cake kill' or 'cake kill -9' to force the jvm to restart

o.O Bye, A.

swannodette commented 14 years ago

What happens when you try to start cake manually from Terminal ?

aria42 commented 14 years ago

Hmm looks like a cake issue. Can you use cake repl and the other cake tools on the command line?

adinapoli commented 14 years ago

Yes, I can invoke "cake repl" from the terminal without any problems. I've tried to create and save a clojure file outside any leiningen project or stuff like that, and I obtain again the first error (see above, NullPointerException bla bla bla). The file used for the test is saved with extension .clj in my Desktop dir. Regards, A.

swannodette commented 14 years ago

Which version of cake are you using? 0.5.3 is broken for me.

adinapoli commented 14 years ago

I think it's the last one: I've installed it through the self install script because installing with git push gave me the same problem depicted here. How can I install an arbitrary version of cake through git? Thanks, A.

swannodette commented 14 years ago

Sorry for the delay, been swamped w/ work. Checking this from the airport on the way to #clojureconj :) Looks like

cake/env
is nil under 0.5.3, this how we read information about the shell environment including TextMate specific ones.

swannodette commented 14 years ago

Cake has been patched! Please update to Cake 0.5.4 and things should be working again.

johnpaulashenfelter commented 14 years ago

I had same nullpointer problem. I upgraded to Cake 0.5.4 and now I get

env: cake: No such file or directory

I'm at #clojureconj if you want to work on it face-to-face

swannodette commented 14 years ago

Hmm. Are you using RVM? Feel free to bug me about this tomorrow.

adinapoli commented 14 years ago

It's working like a charm for me instead :) Thanks!