Fork me on GitHub
#vim
<
2020-08-29
>
jkrasnay16:08:51

I’m having trouble with Conjure and Figwheel. I run :ConjurePiggieback to start the connection and it seems to work, but I can’t seem to reliably eval stuff unless I manage to somehow create a session. I thought I had sessions figured out but <localleader>sl doesn’t seem to do anything (it did before, but I can’t seem to get back there).

Olical16:08:39

Hmm, nREPL session issues can sometimes be fixed with a <localleader>sQ to close all sessions and assume a new one.

Olical16:08:54

Although that session is the thing that had your ClojureScript environment set up :thinking_face:

Olical16:08:04

Then you'll end up back in Clojure land.

Olical16:08:20

I think piggieback essentially creates a session that has CLJS hooked up, or converts your existing one.

Olical16:08:51

I'll have to see if I can reproduce this... any time I've worked with cljs it's been through shadow-cljs, so I've tested that route far more.

jkrasnay16:08:35

It seems to be intermittent. I restarted everything and refreshed the browser and everything seems to be back to normal.

jkrasnay16:08:14

I think perhaps the whole thing gets hung up if Figwheel isn’t connected to the browser when I run :ConjurePiggieback

jkrasnay16:08:34

Yeah, that’s it. Looks like Figwheel blocks while waiting for the browser, and any other Conjure commands queue up waiting for it.

jkrasnay16:08:08

Thanks for being the rubber duck!

jkrasnay16:08:47

BTW other than my confusion, the session model in Conjure is awesome! I’m doing a lot of work in .cljc files and it’s great to see clearly whether my evals are going to Clojure or CLJS. Thanks!

Olical17:08:32

Ohh interesting, so it's all good now when the browser is ready?

Olical17:08:37

I'm glad! 😄

jkrasnay17:08:42

Yeah, once the browser connects to Figwheel everything starts working again. Kinda makes sense in retrospect but there’s no visibility of the state. It would have been nice if Figwheel had blurted out “waiting for browser to connect” or some such.

Olical18:08:45

Nice! Yeah there's no feedback from figwheel, I don't think shadow tells you either but they may have considered some sort of nREPL message when a client connects :thinking_face:

Olical18:08:54

And you need a runtime (browser) to run any CLJS

Olical18:08:04

Otherwise it's compiled but sent to the void

Olical18:08:14

So glad it's working!

Olical18:08:24

Feedback in #conjure is welcome!