Fork me on GitHub
#cider
<
2017-03-17
>
ag19:03:37

can someone tell me briefly what currently doesn’t work with cider-connect vs when you do straight jack-in?

richiardiandrea19:03:31

@ag Cider-connect just connects to a pre-launched repl , did I understand the question correctly?

ag19:03:00

yes, for example edn-format doesn’t work for me when connected

richiardiandrea19:03:31

Uhm difficult to say but the emacs tools should all be available, Clojure ones depends on if you have them on the classpath

richiardiandrea19:03:25

The jack in command can pasted in the terminal

ag20:03:09

@richiardiandrea certain things seem to break or not to work properly when you use cider-connect. For reasons I do not fully understand. I always tried to use cider-jack-in and cider-jack-in-clojurescript, but thinking if we can wrap entire app in a docker container and connect to it

ag20:03:30

what would we have to give up? maybe clj-refactor?

ag20:03:59

first thing I noticed cider-format-edn-buffer doesn’t work

ag20:03:16

it works fine when jacked-in

richiardiandrea20:03:52

Never tried that, but a remote repl if configured right should not be different, at the end of the day you are just not connecting locally but remotely

richiardiandrea20:03:24

Probably in the dcker you don't setup the middleware?

richiardiandrea20:03:46

I mean cider-nrepl should be in your dependencies

richiardiandrea20:03:55

Jack in adds that for you

richiardiandrea20:03:33

If you execute exactly the same command that Jack in triggers in the docker image, I bet you would have the same behavior

ag20:03:01

I’ve added cider-nrepl dependency, started repl in terminal, connected to it, format-edn-buffer still doesn’t work ;(

ag20:03:40

cider-format-edn-buffer: Wrong type argument: char-or-string-p, nil - what else should I do to correctly “inject” the middleware?

dpsutton20:03:23

ag, do you know how to generate a bit more of a stack trace in emacs?

dpsutton20:03:28

if so we could look into that one

ag20:03:56

hold on, let me follow cider-nrepl readme, maybe I get it working

dpsutton20:03:22

that's weird

dpsutton20:03:36

but you can eval things?

dpsutton20:03:52

i'll bet this is a default connection hogwash

ag20:03:55

yup I can eval things

dpsutton20:03:47

can you tell me the result of eval'ing (cider-current-connection)

dpsutton20:03:00

because it seems to not be *cider-repl localhost*

dpsutton20:03:13

if you could just eval that with M-:

ag20:03:35

alright, I have followed every instruction in cider-nrepl readme, added ALL listed middleware, connected, yet edn-format-buffer doesn’t work

ag20:03:18

@dpsutton it is cider-repl localhost

ag20:03:33

oh wait… do I need to have refactor-nrepl dependency? I think I do

dpsutton20:03:38

i don't think that's your error

dpsutton20:03:49

i don't know why it's not seeing the connected process

dpsutton20:03:19

it ultimately goes through cider-nrepl-send-sync-request which should be just fine

ag20:03:34

hmmm I added refactor-nrepl, followed the instructions, still can’t get edn-format-buffer, now checking if it’s a version conflict

dpsutton20:03:10

Debugger entered--Lisp error: (error "Buffer *cider-repl localhost* has no process") makes it sound like you're disconnected or things have gone seriously wrong

ag20:03:15

seems the hassle of getting all the features that CIDER provides through cider-connect is just way to big. It’s simply better to jack-in

dpsutton20:03:34

that's unfortunate

dpsutton20:03:44

if you can post an issue i'll have a way to look at it over the weekend

dpsutton20:03:57

hopefully we can narrow that gap

ag20:03:19

so here’s what I’m doing: cider-jack-in, cider-scratch, type a form, run edn-format-buffer - Boom! it works. through cider-connect - it doesn’t. not very critical for me - I guess I would keep jacking-in. But it would be nice if things work also when cider-connect

ag20:03:55

I will create a formal issue (later)

dpsutton20:03:50

awesome. thanks

dpsutton20:03:56

i'll try it this evening if i can

dominicm20:03:38

@ag Didn't see this mentioned. What's in your /.lein/profiles.clj / /.boot/profiles.boot

ag22:03:19

I don’t even have ~/.boot/profiles.boot

dominicm08:03:19

Depends on if you're lauching a boot or lein project. If you're doing boot repl without anything funky to load in cider, many of the features of cider won't work.

dottedmag21:03:49

I can't get company-mode work with cider-powered completions. I see that requests for completions are sent to REPL, but the response is always completions nil. Any idea how to debug?

(--> 
  op  "complete"
  session  "8eb64e7f-4dbb-41fa-a809-0e86c765beda"
  ns "abc.test"
  symbol  #("slu" 0 5 (cider-locals nil fontified t help-echo cider--help-echo))
  context  ":same"
  id  "44"
)
(<-- 
  completions  nil
  id  "44"
  session  "8eb64e7f-4dbb-41fa-a809-0e86c765beda"
  status  ("done")
)

dottedmag21:03:27

CIDER 0.15.0snapshot (from el-get)

dpsutton21:03:48

have you loaded the current namespace?

dpsutton21:03:57

ie, you're no longer in the user ns but in one you want to work in?

dottedmag21:03:30

Ah, damn. I haven't.

dottedmag21:03:34

@dpsutton Thanks, it works now 😃

dpsutton21:03:48

yeah, cider doesn't read your source, it just learns what you've got loaded

dpsutton21:03:53

and until you load anything, it's got nothing

dpsutton21:03:58

contemplates

dpsutton21:03:00

my emacs saves buffers when i tab out. definitely wouldn't want that behavior

dpsutton21:03:38

and i've got send to repl baked into my hands C-u C-c M-z i think. My hands can do it but i can't type it

ag22:03:05

so guys, can someone help me to get it right… so it works on my machine, it works on machine of my colleague, it doesn’t work on machine of my other colleague: he sets cider-boot-parameters, runs jack-in clojurescript, yet cider opens Rhino repl

ag22:03:14

for me it does the right thing

ag22:03:09

what could be wrong?

ag23:03:55

it seems cider is ignoring cider-boot-parameters

ag23:03:01

is it possible?

ag23:03:43

how do I debug it?

xiongtx23:03:00

Do you all have the same version of CIDER?