Fork me on GitHub
#cider
<
2022-03-23
>
Akiz05:03:56

Hi, i am trying to find some resource about running clj and cljs repl in case of monorepo. My workflow: 1) jack-in-clj 2) running shadow-cljs watch 3) connect-in-cljs Cljs repl opens but is is not used by cider when i want to eval something in any cljs file. I would like to have same repl functionality for CLJ and CLJS. Thanks for help

vemv08:03:04

@zikajk I think you're hitting https://github.com/clojure-emacs/cider/issues/3097#issuecomment-988750187 which really should be fixed, the issue has been lingering for too long

Akiz08:03:35

Ahh, is there some workaround? I relly on hot reload right now but it is limited if you need to eval just some cljs sexp etc.

vemv08:03:30

Perhaps there's a buffer for the cljs repl and you can enter things there (semi-) by hand?

Akiz08:03:41

@U45T93RA6 yeah, this is fine sometimes. But it gets complicated in large codebase. Thanks for the tip.

vemv08:03:42

If you get to hack on sesman / CIDER for obtaining the following behavior: > if the file is .cljs and there's exactly one cljs connection, use that one no matter what I think that PR would be extremely welcome

👍 1
Akiz08:03:24

It would 😔

neural16:03:23

Hey @zikajk don't know if it is this that you mean, but i have my workflow like this: I have a monorepo with backend and frontend ns, then 1. jack-in-cljs: it starts a shadow-cljs watch 2. cider-connect-sibling-clj It's gonna open two repl buffers, one for cljs and one for clj. Then if you have like a cljc file that both ns use it will work on both repl.

Akiz16:03:02

@UCE6QCEQP nice tip. I will try that soon. I am running shadow-cljs/watch from clj namespace now.

Akiz09:03:49

@UCE6QCEQP Hey, that works great both ways. I can do cider-connect-sibling-cljs, no problems so far 👍

neural15:03:34

@zikajk Great!! I jack-in-cljs first to let cider handle the shadow stuff... i rarely handle with shadow ns (:target :browser most)