Fork me on GitHub
#vim
<
2019-08-05
>
Chase20:08:54

Anyone using vim-fireplace with shadow-cljs? I got clj and cljs repl's connected with a lot of help from tpope and friends but that required me to replace [cider/cider-nrepl "0.21.1"] with [nrepl "0.6.0"]. #cider found this weird as they aren't interchangeable like that. The repl's and hot reloading work great as far as I can tell but all other tooling like clojure-vim/async-clj-omni (from dominicm?) no longer works because anytime I add cider-nrepl to my dependencies all hell breaks loose. So maybe I don't have full vim-fireplace functionality, I don't know. And I hate to lose all that goodness dominicm helped me with too but the shadow nor cider folks use vim or cider to help.

Hukka05:08:30

Can't help you, but I'm interested too. I wasn't using fireplace yet when I last used shadow, but sooner or later I will do frontend stuff again and will run into exactly same problem.

dominicm05:08:47

shadow & fireplace worked at some point

dominicm05:08:08

they should still work really, but the :Piggieback command probably changed in recent version

dominicm05:08:27

yeah, that is weird 🙂 I was watching that conversation very confused

dominicm05:08:12

I guess I can spin up a new shadow project and check how it goes

Chase09:08:01

yeah, it all worked with cider-nrepl a few months ago. Here is the new piggieback command you would need: https://github.com/thheller/shadow-cljs/issues/62 It's :Piggieback (shadow.cljs.devtools.api/nrepl-select :app) in my particular case.

dominicm09:08:54

ah, you're already on that eh 🙂

Chase10:08:56

tpope tracked that one down for me. I would have never found that sucker

dominicm10:08:21

I'm a bit confused, I downloaded https://github.com/minimal-xyz/minimal-shadow-cljs-browser/blob/master/shadow-cljs.edn and connected, and piggieback worked fine, I got a js/alert working

dominicm10:08:24

what's broken? 😄

Chase15:08:40

lol! of course. let me try this out.

Chase15:08:00

so you have no dependencies in there? I don't get it.

Chase15:08:53

how weird is that! So yeah the repl's connect fine without the dependencies at all. Not sure how that worked because I thought I was just told two weeks ago that fireplace requires cider-nrepl.

Chase15:08:34

But are you saying you also have your clojure-vim/async-clj-omni working for autocompletion and docs and such? @U09LZR36F

Chase15:08:55

because how does that work without cider/cider-nrepl? I'm so confused

dominicm15:08:44

no, I added cider/cider-nrepl to the deps, and it still worked

Chase15:08:23

what the frick!?

dominicm15:08:47

I didn't test completion, but I assume it would work

Chase15:08:32

When I add [cider/cider-nrepl "0.21.1"] to my dependencies and try to connect I get a long stacktrace error that starts with this:

[2019-08-06 16:50:41 - SEVERE] Unhandled REPL handler exception processing message {:id 398aa901-f222-47a9-ac21-67eb35075490, :op classpath}
java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'nrepl.transport/Transport found for class: clojure.tools.nrepl.transport.FnTransport
And neovim locks up until I hit C-c to run vim interrupt

Chase15:08:39

that explains some of the mystery though. I never needed that nrepl dependency or piggieback apparently. I was just having an issue with this cider-nrepl dependency the whole time.

Chase15:08:05

https://pastebin.com/cgH7V1b4 Do you happen to notice anything here? This is git cloned from the tutorial I'm using but just replacing proto repl (he uses Atom) with cider

dominicm17:08:06

Nothing jumps out :thinking_face:

Chase17:08:56

no worries. I'm failing to see exactly how this: https://github.com/jacekschae/learn-reagent-course-files/tree/master/giggin differs from your example repository but I'm missing something. I can complete the tutorial without cider I guess I just don't know what I'll do in the future.

tpope17:08:23

I just tried adding cider-nrepl to a shadow-cljs project and it's also blowing up in weird ways

Chase17:08:23

oh thank goodness. lol. My default is that I'm doing something horribly inept but thankfully someone competent has confirmed

tpope17:08:19

i mean i'm competent with fireplace but i wouldn't call myself competent with shadow-cljs ¯\(ツ)

Chase17:08:18

last time I wrangled you into this I had asked the shadow-cljs folks about the "blowing up" and that's when theller recommended the nrepl thing instead. But the cider guys say that's not right. But theller doesn't use cider so it's a fun little back and forth in which I can provide nothing to help

Chase17:08:52

let me go ask the cider guys again and see if they know what's up.

tpope17:08:24

I just found a bug on automatic piggiebacking that may or may not have been affecting you

tpope17:08:28

try the latest

Chase17:08:23

updated (I saw the fix in the commit list of updates) and still getting the error and inability to connect with clj before I get to the piggieback stage though.

tpope17:08:55

is :CljEval 1 failing?

tpope17:08:18

are you running shadow-cljs watch app or what?

Chase17:08:28

oh wait, hold on.

Chase17:08:17

sort of. I run npm run dev and that starts shadow-cljs watch app

λ ~/projects/learn-reagent-course-files/giggin : npm run dev

> [email protected] dev /home/chaselambert/projects/learn-reagent-course-files/giggin
> shadow-cljs watch app

shadow-cljs - config: /home/chaselambert/projects/learn-reagent-course-files/giggin/shadow-cljs.edn  cli version: 2.3.30  node: v12.6.0

Chase17:08:37

running that :CljEval 1 command just locks up my editor until I C-c out of it.

tpope17:08:32

npm run dev should work

tpope17:08:10

tested that on conduit if you're looking for another app to try

Chase17:08:15

i'll try that one now

Chase17:08:14

that one works!

Chase17:08:47

so maybe it's one of the other dependencies or something? I'll have to compare the edn files

tpope17:08:09

yeah that's where i'd start

Chase17:08:19

sweet! I'll try and track that one down. unfortunately I have to run out right now. Thanks for all your help again!

Chase17:08:17

I'll be back on in a couple of hours and I'll update if I solve it.

dominicm19:08:33

Maybe you need nrepl & cider? Just a suspicion

Chase19:08:59

I think I've solved it fellas. I updated the shadow-cljs dependency in the package.json and I think everything is working fine now.

Chase19:08:32

I really apologize if that's something that should have been super obvious to do and I've wasted all your time. At least it seemed a couple non related bugs were found, right???

Hukka12:08:24

@U9J50BY4C Just curious, so old version of shadow was the cuplrit? What was the broken version?

Chase15:08:56

The tutorial I am using had it at "2.3.30" but the current version is "2.8.43". I guess you set it in the package.json file though, not anywhere in the edn config.

4