tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Hangs on connect #228

Closed mateusz- closed 9 years ago

mateusz- commented 9 years ago

I am using Android Clojure tools.

Connecting to the Android repl gives me the following:

$ lein repl :connect 9999
Connecting to nREPL at 127.0.0.1:9999
REPL-y 0.3.5, nREPL 
Clojure 1.7.0-beta3-r2
Dalvik 0.9
FileNotFoundException Could not locate clojure/java/javadoc__init.class or clojure/java/javadoc.clj on classpath.  clojure.lang.RT.load (RT.java:474)
#object[clojure.lang.Namespace 0x279f0008 "user"]
Error loading namespace; falling back to user
nil
user=>

Vim fireplace, on the other hand, hangs and does nothing:

Connect nrepl://127.0.0.1:9999

Ctrl-c saves the day, and the output is:

Vim(python):Traceback (most recent call last):

I went through the plugin, and Vim hangs on this

let response = client.message({'op': 'classpath'})[0]

In nrepl.vim.

This is related to the "error loading namespace" issue above, correct? Is there any better way of handling this? Looks like this error has been reported in the lein-droid project. clojure-android/lein-droid#128

tpope commented 9 years ago

So, that sounds like it is claiming to have the 'classpath' operator (client.has_op('classpath')) but doesn't actually support it?

mateusz- commented 9 years ago

Ok, maybe that's it, I figured it had something to do with the exception.

rhg commented 9 years ago

This only occurs when the cider middleware is active. Perhaps this is due to lein-droid-cider interactions.

tpope commented 9 years ago

The cider middleware is what provides the classpath op (i.e., what makes client.has_op('classpath') true). So yeah, sounds like a good hypothesis.

alexander-yakushev commented 9 years ago

Clojure-Android project indeed doesn't support clojure.java.classpath/classpath call, but incorrectly wraps the respective Cider middleware. @tpope , will it remove the freeze if I stop claiming to support classpath middleware?

tpope commented 9 years ago

Yep.

alexander-yakushev commented 9 years ago

@mateusz- I removed classpath middleware in combination of lein-droid 0.4.0-SNAPSHOT and Neko 4.0.0-SNAPSHOT. I would appreciate if you try it out and say if the bug persists.

mateusz- commented 9 years ago

@alexander-yakushev All good now, thank you!

alexander-yakushev commented 9 years ago

Great, thanks for reporting!