Fork me on GitHub

first day using Conjure on the job. it's awesome

🚀 15

When doing :ConjureShadowSelect dev I get this:

; shadow-cljs (select): dev
; (err) Execution error (ClassNotFoundException) at (
; (err) shadow.cljs.devtools.api
I read that as indicating that I'm missing shadow-cljs dependency somewhere, but I've got it in my deps.edn (`thheller/shadow-cljs {:mvn/version "2.8.60"}`), and can (require '[shadow.cljs.devtools.api :as api]) it successfully. shadow-cljs is running in a Docker container, if that's relevant. Any idea why I can't connect to shadow-cljs's REPL with Conjure?


Or maybe I'm doing something wrong. I'm doing this after I've connected to an nREPL, started with vim-jack-in's :Lein.


Hmm I'm pretty sure you need to use the nREPL shadow starts?


Oh, OK. So do I need to :ConjureConnect to shadow's nREPL port?


As described in here (although you've maybe already seen it?)


Yep, I don't think you can use a regular lein nREPL with shadow as a dependency.


Although shadow-cljs may have docs on doing it this way.


Shadow select assumes you're connected to shadow-cljs' nREPL server.


Ah, OK. I think I misunderstood how it works (I'm not well versed in *-cljs)


If you start shadow-cljs and shutdown your lein server Conjure should automatically connect using the shadow-cljs portfile too.


Is the idea that I connect to shadow-cljs's nREPL and a Leiningen nREPL concurrently?


Will Conjure then switch between them based on the filename of the buffer I'm in?


Nope, you can only connect to one at a time at the moment unless you set up some autocmds to fire when you enter you clj / cljs directories to swap Conjure states as described here to some extent:


ConjureClientState will allow you to create two parallel "states", one connected to a CLJS env and another connected to CLJ. It's up to you how you swap between them. I use autocmds that set the state to my cwd on dir change. That means I can :cd ... into things and get a different connection per dir.


I'm sorry I don't have a smooth experience for working with two REPLs at the same time right now, the tools are there for it, but you have to roll your own experience a little since everyone has different expectations and requirements around this area. AFAIK there's no one size fits all solution, so I try to provide the building blocks anyone will need to suite their needs. I hope...


All good! I'm still just trying to figure out how the pieces should fit together 🙂