Fork me on GitHub
#cider
<
2019-04-02
>
soulflyer01:04:52

Just a thought, is it possible to "inject the middleware" by hand, after connecting to the repl?

dpsutton01:04:53

Without docker you can try just cranking up cider with the same command cider jack in would use. I think you'll see some output if you do this from the command line

soulflyer02:04:26

Ah-ha! cider-jack-in is adding cider/nrepl to the plugins. Not sure why, I don't have it in the project file, only nrepl/nrepl in dependancies. But... changing the startup command from lein repl :headless to lein update-in :plugins conj \[cider/cider-nrepl\ \"0.21.2-SNAPSHOT\"\] -- repl :headless lets it start ok. Now I get the clj-refactor warning but I can live with that. 😁

dpsutton02:04:12

Ha. That was the error it was giving you

dpsutton02:04:45

Cider requires cider nrepl for the good bits

soulflyer03:04:21

I think I have been getting confused between cider/nrepl and cider-nrepl. The first is deprecated, but we still need the second, yes?

dpsutton03:04:14

There's tools.nrepl which is deprecated and nrepl/nrepl 0.6.0 which replaces it. Cider/cider-nrepl are the nrepl middleware for cider which allows it to do all of it's fancy bits

Arthur09:04:26

hello guys! I have just switched from linux to macos and have noticed that cider debug is incredibly slow comparing to ubuntus…does someone has the same problem? is it possible to fix it somehow? Thank you!!

tianshu13:04:41

after a long time use, when I close the cider connection, still get the error

[nREPL] Connection closed
error in process sentinel: nrepl-send-sync-request: Wrong type argument: stringp, nil
error in process sentinel: Wrong type argument: stringp, nil
at this moment, the nrepl process will not be quit, If I kill the buffer with C-x k, will get the error
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: 
error in process sentinel: Could not start nREPL server: 
If I start cider again, it will prompt for Lisp expression:

bozhidar14:04:44

@doglooksgood Errors in the process sentinel are not very descriptive. Without a more specific stack trace I have no idea what went wrong for you.

dpsutton14:04:23

you can see if there are any messages in *Messages* or can try to start from the command line using the same command cider uses and see if there are any obvious errors

ghadi16:04:45

how do I prevent cider from slurping URLs?

dpsutton16:04:12

(setq cider-repl-use-content-types nil) i think

dpsutton16:04:45

although the knob may have been removed now that i'm looking through it

ghadi16:04:17

seems to have done the trick

bozhidar17:04:29

It’s not removed, although at some point we’ll have to actually fix the underlying problem. 🙂

dpsutton17:04:15

we should probably make it opt-in rather than opt-out

dpsutton17:04:24

while we think about a fix

ghadi17:04:04

it can be a security problem to automatically deref URLs

dpsutton17:04:53

Yeah. Images are fine. Arbitrary urls not good

chepprey23:04:23

question on cljs + shadow-cljs + cider-nrepl tooling setup...

chepprey23:04:41

I've previously gotten Emacs + Cider + regular Clojure (not cljs) all up and running for my 1st ever Clojure project. I went with Emacs since I had some experience with it 25 years ago. Anyhow, I got the jist of REPL development.

chepprey23:04:57

Now I'm trying Clojurescript, to implement the client-side of my little learning project. FWIW I'm trying the "Learn Reagent Free" course at https://www.jacekschae.com (free plug). WELL...

chepprey23:04:33

I'm having trouble getting the REPL going in this setup. The online course supplies the basic config files, so most of what I have was provided.

chepprey23:04:46

I modified shadow-cljs.edn and added the cider-nrepl dependency.

chepprey23:04:03

Using the npm run dev command, it spins up shadow-cljs and starts up nREPL on port 3333.

chepprey23:04:16

I run cider-connect and give localhost / 3333, and emacs/Cider connects to the REPL. GREAT. The problem (or my confusion) starts here:

chepprey23:04:32

doing any sort of "eval" of any forms, buffers, or anything in Emacs seems to just... do... nothing.

chepprey23:04:47

I can enter expresions in the REPL buffer (+ 3 4) yields 7, so the REPL is there. But it doesn't seem "connected" to any of my .cljs files or anything.

chepprey23:04:04

So i'm just kinda lost.

chepprey23:04:19

Another point: when I was just doing Clojure, I used cider-jack-in to start the REPL. With this shadow-cljs it seemed I had to use cider-connect; perhaps this line of thinking is wrong & is the problem?

chepprey23:04:35

When I try to do cider-jack-in, Emacs gives the error The npx shadow-cljs executable isn't on your 'exec-path'

bozhidar06:04:07

I think the approach with cider-connect is the simplest one. You just need to select cider-connect-cljs, and upgrade the new REPL to a shadow-cljs REPL. I started playing with this tutorial myself and that’s what I did.

chepprey01:04:16

HUZZAH thank you @U051BLM8F and @U4TE22XR8 very much, got a repl going.

chepprey02:04:38

The hint (and my mistake) was the "upgrade it to a shadow-cljs REPL". After cider-connect-cljs, I was skipping the important step of specifying "shadow" as the type. Then after that it wanted to know which shadow "build" to use, then it informed me that the browser wasn't up and running (a browser Reload cured that), then after that it all seemed to connect up. Thank you very much. My journey unto Cljs SPAs begins at last!

manuel05:04:58

glad it worked 🙂