conjure

:neovim:+:clj: https://github.com/Olical/conjure - If you're enjoying Conjure and want to say thanks: https://github.com/users/Olical/sponsorship :smile: (alt https://conjure.fun/discord)
2020-11-24T04:46:52.215800Z

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

🚀 5
walterl 2020-11-24T16:45:06.219500Z

When doing :ConjureShadowSelect dev I get this:

; shadow-cljs (select): dev
; (err) Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:471).
; (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?

walterl 2020-11-24T16:45:33.220100Z

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.

Olical 2020-11-24T16:47:25.220600Z

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

walterl 2020-11-24T16:48:15.221100Z

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

Olical 2020-11-24T16:48:21.221300Z

As described in here (although you've maybe already seen it?) https://github.com/Olical/conjure/wiki/Quick-start:-ClojureScript-(shadow-cljs)

Olical 2020-11-24T16:48:39.221800Z

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

Olical 2020-11-24T16:48:48.222100Z

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

Olical 2020-11-24T16:49:00.222400Z

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

Olical 2020-11-24T16:49:18.222900Z

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

walterl 2020-11-24T16:51:28.223100Z

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

walterl 2020-11-24T17:13:31.224500Z

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

walterl 2020-11-24T17:13:32.224600Z

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

Olical 2020-11-24T17:15:56.225300Z

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: https://github.com/Olical/conjure/blob/bcdaf3761b762dafb4314389d84294232dd61ed6/doc/conjure.txt#L69-L78

Olical 2020-11-24T17:16:23.225600Z

This issue may also be relevant https://github.com/Olical/conjure/issues/135

Olical 2020-11-24T17:17:25.227Z

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.

Olical 2020-11-24T17:18:16.228100Z

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...

walterl 2020-11-24T17:28:17.228900Z

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