Fork me on GitHub
#cider
<
2020-04-17
>
sofra07:04:58

Hi all, anyone had any luck getting `shadow-cljs`, `deps.edn` and `cider` working nicely together? Things work perfectly just using `shadow-cljs` and `cider` but when I try to use `deps.edn` as well the `cider-jack-in-cljs` stops working. I select `cider-jack-in-cljs` -> `clojure-cli` and then my build and I get the following error. error in process filter: The shadow-cljs ClojureScript REPL is not available. Please check for details looks related to this https://github.com/clojure-emacs/cider/issues/2812?

FiVo07:04:05

Did you try the solution I posted at the end of that thread?

FiVo07:04:22

Currently there is no way to get the cljs repl with shadow out of the box if you you use deps.edn or lein. You need to launch it yourself.

FiVo07:04:57

But the error you are getting looks like there is already something in your setup that is amiss.

dpsutton12:04:21

does this work from the command line? its complaining that shadow isn't on the classpath which sounds like what you are attempting won't be able to work. are you missing shadow as a dependency in deps.edn?

sofra13:04:15

it does work from the command line, I had it in my deps.edn but under an alias as was shown in the shadow docs, but yeah that was that problem I will try your solution @UL638RXE2

sofra13:04:26

thanks for the help!

David Pham07:04:13

Hello, did you try to launch a shadow-CLJS watch app, and then cider-connect-cljs,

David Pham07:04:25

It works fine for me.

erwinrooijakkers10:04:10

When running tests from Cider, Cider is not aware of Leiningen :test profile resource-paths , is there a workaround?

erwinrooijakkers10:04:13

Maybe best to put the resources under dev and test profiles, and not in uberjar’s resources

bozhidar10:04:30

@erwinrooijakkers You can adjust the command CIDER uses to run leiningen to include the :test profile as well.

eval-on-point12:04:44

I think best practice is to put the resources under :dev

rschmukler20:04:06

Hey @bozhidar would you be open to a PR that adds babashka support as a project type? Now that babashka ships with an nRepl server, it'd be awesome to be able to quickly get into a babashka compatable scripting environment via cider-jack-in. If you think it's too specific, happy to keep using cider-connect, but I think it could be really cool!

borkdude20:04:24

( @rschmukler there are some docs here, including a script to write a .nrepl-port file on startup, which may help: https://github.com/borkdude/babashka/blob/master/doc/repl.md#nrepl )

rschmukler20:04:47

@borkdude amazing! I've had good success with cider + bb. But it'd be awesome to be able to do cider-jack-in anywhere and get prompted to automatically start a new babashka process w/ --nrepl-server so that I can just hop into scripting. It's definitely not a huge pain as is, but figured it could be convenient for others

bozhidar17:04:43

I’ve been thinking about adding something like this to CIDER myself. File some ticket and we’ll make it happen.

🔥 8
thanks3 4
dpsutton21:04:07

what file does bb use as a project root?

dpsutton21:04:08

but if you do a prefix with cider jack in, you can edit the command string and just replace bb at the beginning