cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
ozzloy 2020-08-19T05:26:27.072100Z

i'm new to cider. i am trying to use cider with biff example project. i tried: git clone https://github.com/jacobobryant/biff biff1

ozzloy 2020-08-19T05:29:27.074600Z

cd biff1/example ./task setup ./task dev open localhost:9630 builds -> app emacs biff1/example/src/example/client/app.cljs M-x cider-jack-in-cljs and i get the error message: > error in process sentinel: Could not start nREPL server: shadow-cljs - config: /home/ozzloy/src/clojure-explorations/biff-stuff/biff1/example/shadow-cljs.edn > shadow-cljs - connected to server > server already running

ozzloy 2020-08-19T05:30:15.075100Z

how do i get to (js/alert "hi")?

ozzloy 2020-08-19T05:31:18.075900Z

i've also tried killing ./task dev and then doing cider-jack-in-cljs

ozzloy 2020-08-19T05:41:15.078300Z

which command should be used? shadow-cljs. ClojureScript REPL type shadow, shadow-cljs build app. Visit localhost:9630 in a browser? y. then i get this output: https://wtools.io/paste-code/b1OJ

Juan A. Sanchez 2020-08-19T12:58:19.080200Z

Anyone has any good example/blog post on using cider with docker?

Sam Heaton 2020-08-19T14:35:47.081900Z

Quick question if anyone knows: Is it expected behaviour for a clojure.lang.Compiler$CompilerException ("No reader function for tag dbg") to be thrown when trying to compile (C-c C-k) a buffer with a #dbg annotation on a function for debugging?

dpsutton 2020-08-19T14:39:30.082600Z

not expected. those tags are defined in cider-nrepl. are you sure you have cider-nrepl on your classpath?

zackteo 2020-08-19T14:41:18.085Z

Hi guys, does anyone configure their .clojure/deps.edn for use with CIDER? Was trying to figure REBL out and that led me to https://github.com/seancorfield/dot-clojure/blob/develop/deps.edn which I don't think is exactly very relevant ... I can't tell.

Sam Heaton 2020-08-19T14:42:14.086Z

I'm connecting to an external Boot repl via CIDER.. although the CIDER version the Boot command is using is 0.21.1.. that may be the problem

dpsutton 2020-08-19T14:42:49.086800Z

cider uses its own main to start up the nrepl server with the correct middleware. REBL uses a main to set itself up. there is a middleware to use both at the same time but i've never done it. you shouldn't need to configure deps.edn to work with CIDER. if starting up a deps.edn backed project CIDER knows how to inject its dependencies and start up correctly

dpsutton 2020-08-19T14:43:12.086900Z

does the boot repl have cider-nrepl on the classpath?

Sam Heaton 2020-08-19T14:45:30.087500Z

I believe so

boot -d nrepl\:0.6.0 \                    
     -d cider/cider-nrepl\:0.21.1 \
[...]

Sam Heaton 2020-08-19T14:46:46.088200Z

I'm not sure if I can boost the cider-nrepl version due to some old middleware in the project, but I'll try that

zackteo 2020-08-19T14:47:16.088900Z

I see I see. Do many people integrate REBL into their workflow actually? Have been trying to understand it

2020-08-24T13:29:36.011100Z

You can use my nrebl middleware to do this: https://github.com/RickMoynihan/nrebl.middleware I’ve been meaning to contribute it to cider for a while, but never quite got around it

dpsutton 2020-08-19T14:48:34.090300Z

i have no idea about how many people use it. i know of one vocal advocate of sean corfield. it seems like its built for socket repls mostly. You could also perhaps start up an nrepl server manually in a dev namespace and let REBL start the way it likes but i'm not sure if this will limit its functionality

dpsutton 2020-08-19T14:49:55.090400Z

the #dbg data reader has been there since about 0.10.0 so it should be there. check whats in *data-readers*

👍 1
Sam Heaton 2020-08-19T14:50:33.090700Z

Hmm, ok. Thank you!

Sam Heaton 2020-08-19T14:51:02.090900Z

Empty map!

dpsutton 2020-08-19T14:51:34.091100Z

then you are missing some things. can you verify that cider-nrepl is on your classpath?

dpsutton 2020-08-19T14:51:43.091300Z

and not just what you think the startup command is but find it on the path

dpsutton 2020-08-19T14:52:08.091500Z

(apropos "cider") should be sufficient

zackteo 2020-08-19T14:52:44.092Z

I see I see! 😮

Sam Heaton 2020-08-19T14:54:48.092100Z

Had to qualify the apropos namespace (weird) but here's the result

(cider.nrepl/cider-middleware
cider.nrepl/cider-nrepl-handler
cider.nrepl.middleware.out/cider.nrepl.middleware.out.proxy$java.io.OutputStream$ff19274a
cider.nrepl.middleware.out/cider.nrepl.middleware.out.proxy$java.io.Writer$ff19274a
cider.nrepl.middleware.out/cider.nrepl.middleware.out.proxy$java.util.TimerTask$ff19274a
cider.nrepl.middleware.util.cljs/cider-piggieback?cider.nrepl.version/cider-version-reply

[bunch of internal stuff])

Sam Heaton 2020-08-19T14:55:14.092300Z

The internal stuff is not Cider related, but has the word "decider" in it so..

dpsutton 2020-08-19T14:55:39.092500Z

gotcha. this is interesting. i'd google for boot and data-readers. wonder if there's a bug

dpsutton 2020-08-19T14:55:56.092700Z

https://github.com/boot-clj/boot/issues/47

Sam Heaton 2020-08-19T14:56:45.093Z

Oof. Thank you. Good find

Sam Heaton 2020-08-19T14:58:16.093200Z

Looks like I'll have to update the build.boot. Thank you! This turned out to be more complicated than I expected

zane 2020-08-19T16:29:20.093400Z

No, but the key bit is just making sure that relevant ports are available from outside the container.

zane 2020-08-19T16:29:44.093600Z

Once you’ve got that taken care of everything just seems to work, at least in my experience.

Juan A. Sanchez 2020-08-19T16:31:06.093800Z

@zane So if I do a cider-connect and give it a port it will inject the libraries it needs?

zane 2020-08-19T16:32:10.094Z

Oh, I’m not sure. The last time I tried it was back before auto-injection.

jumar 2020-08-19T18:38:59.095100Z

Give cider inspector a try and you might not need REBL at all

practicalli-john 2020-08-19T22:58:48.098100Z

@zackteo I have a ~/.clojue/deps.edn configuration that includes several data browsers, REBL, Portal and Reveal. https://github.com/practicalli/clojure-deps-edn I mainly use the cider-inspector though, its excellent for navigating through data structures, especially nested data structures and paging through larger data sets (really useful for data science). Its also much simpler to use. https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html