nrepl/piggieback

Current state of piggieback and vim-fireplace

Reefersleep opened this issue · 6 comments

Hey Chas

Thank you for your work!

I'm wondering if you know how to get piggieback and vim-fireplace to play along in their current versions? I'm having trouble with it.

I've included piggieback and nrepl in my project.clj as per the piggieback instructions, I've got vim-fireplace working (with clojure code and a normal repl, it works just fine), I've got figwheel working just fine, I start up lein figwheel dev with an nrepl with port 7888, I :Connect to my 7888 without errors, and then, when I try to do :Piggieback, it seems like I need an argument. So I try :Piggieback 7888, but still get errors. The actual error is:

IllegalArgumentException No value supplied for key: cljs.repl.browser.BrowserEnv@5bfa34df clojure.
lang.PersistentHashMap.create (PersistentHashMap.java:77)

I googled it and found this Piggieback issue in which you seem to state that Piggieback works in a different way now: #57

But it's still greek to me; does this mean that the current versions of Piggieback and vim-fireplace are incompatible?

I'm new to all this stuff and don't understand how all the different parts fit together, exactly. Also, I'm new to interacting with people on git - I'm sorry if this is an inappropriate way to ask about this. I tried #clojure and #clojurescript a couple of times, no luck :/

It sounds like you're somehow getting an older version of piggieback on your classpath. Make sure you've added piggieback to your :dev profile.

Beyond that, I've not used vim in quite a while, so I can't really offer any tangible help with vim-fireplace itself.

I have the bit that you specify in the Piggieback README.md with ":profiles {:dev {:dependencies [[com.cemerick/piggieback ... etc" in my project.clj . Here's the contents of the file: https://gist.github.com/Reefersleep/be6ad2740025724ed6bc

I've tried lein clean on the project, it did not make any difference.

What leads you to think that the version of piggieback is older? Is there a way to check for it to be sure? I've been wondering myself if I've somehow got a cached, broken or incompatible version of Piggieback lying around.

This should provide you with the version of piggieback on your classpath:

(->  "META-INF/leiningen/com.cemerick/piggieback/project.clj"
  clojure.java.io/resource
  slurp
  read-string
  (nth 2))

What makes me suspect a version issue is the error message, which implies that the cljs-repl function being called is expecting keyword arguments. That function stopped accepting keyword arguments with 0.2.0.

That call in a lein repl in the project root returns "0.2.1".

I'm guessing I'm going to have to chat up tpope about this issue, then? :)

I'm having essentially the same issue here; I've got Piggieback 0.2.1 in my dependencies and yet I can't get Fireplace to play nicely with ClojureScript files. @Reefersleep, did you get any resolution on this with tpope?

Hello @venantius

I'm sad to say that I never got around to it. My home computer broke, and in the mean time, I installed Cursive on my work computer and watched some videos about transitioning from Vim to Emacs Evil mode. Very tempted to leave all the Vim setup troubles behind and try out something new with Spacemacs or Evil Mode + CIDER, maybe supported with Cursive or Nightcode. I spent so much time just to get colour schemes and rainbow parens to play along in Vim, not to mention this issue.