Fork me on GitHub
#cider
<
2020-01-25
>
jmckitrick17:01:59

I’m able to connect to a shadow build in CIDER. Now I want to connect to the CLJ part of the project, which was generated by Luminus.

dpsutton17:01:21

ok. did you run cider-jack-in?

jmckitrick17:01:40

It asked the sibling question. I said ‘yes’ and it silently failed. I think.

dpsutton17:01:57

and you said it silently failed? can you look in the *Messages* buffer to see if there's any information in there?

jmckitrick17:01:59

Opening a CLJ file doesn’t indicate a connection, and compile buffer does not work.

jmckitrick17:01:22

A session with the same parameters exists (bank/bank1:localhost:7002).  You can connect a sibling instead.  Proceed? (y or n) y
[nREPL] Starting server via /Users/jmckitrick/bin/lein update-in :dependencies conj \[nrepl\ \“0.6.0\“\] -- update-in :plugins conj \[cider/cider-nrepl\ \“0.23.0\“\] -- repl :headless :host localhost Loading /Users/jmckitrick/devel/bank/bank1/src/clj/bank1/core.clj...

dpsutton17:01:26

also, do you have anything in ~/.lein/profiles.clj

jmckitrick17:01:34

Let’s see…

jmckitrick17:01:05

Profiles have all been commented out, with only ‘lein-ancient’ remaining.

dpsutton17:01:20

and you can see in your buffers list that there is only the cljs repl?

jmckitrick17:01:32

I just restarted… I’m connected to CLJS/shadow. Running jack-in-clj….

jmckitrick17:01:25

Correct, only CLJS repl buffers.

dpsutton17:01:56

and you've run jack-in-clj?

dpsutton17:01:18

and has it silently failed again?

jmckitrick17:01:20

It asked the ‘sibling’ question and then…. nothing.

dpsutton17:01:29

how long have you waited?

jmckitrick17:01:19

Maybe I should start the back end in a terminal, and just connect….

dpsutton17:01:27

do you see any buffers open? I have an *nrepl-server clojure/my-app ... buffer

dpsutton17:01:32

maybe but it should work

dpsutton17:01:52

can you check in *Messages* buffer for any stacktraces or errors from the startup ?

jmckitrick17:01:19

So ‘connect’ acts like it works, and I have a repl buffer, but it’s warning me that I don’t have cider-nrepl, and the buffer doesn’t have cider functionality.

jmckitrick17:01:25

Let me check the buffer….

jmckitrick17:01:33

No errors at all.

dpsutton17:01:41

yeah. if you go the connect route your are responsible for ensuring that the middleware are set up

dpsutton17:01:52

i'd for sure go with the cider-jack-in version

jmckitrick17:01:02

ok let’s try again…

jmckitrick17:01:39

cider-jack-in-cljs first

jmckitrick17:01:20

Select shadow, then the app build, then visit the ‘active builds’ page. So far so good.

jmckitrick17:01:30

Now cider-jack-in

jmckitrick17:01:50

Connect using sibling, Y

jmckitrick17:01:58

command to use: lein

jmckitrick17:01:07

‘Starting server…’

dpsutton17:01:00

and no error-in-process or anything like that?

dpsutton17:01:23

see this? [nREPL] Direct connection to localhost:36703 established

jmckitrick17:01:25

[nREPL] Starting server via /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.2 -d cider/cider-nrepl:0.23.0 server
[nREPL] server started on 7002
[nREPL] Establishing direct connection to localhost:7002 ...
[nREPL] Direct connection to localhost:7002 established
Visit '' in a browser? (y or n) y
A session with the same parameters exists (bank/bank1:localhost:7002).  You can connect a sibling instead.  Proceed? (y or n) y
[nREPL] Starting server via /Users/jmckitrick/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0\"\] -- repl :headless :host localhost
Mark set [2 times]
line-move-visual: End of buffer [8 times]
line-move-visual: End of buffer

jmckitrick17:01:37

That’s my *Messages*

dpsutton17:01:58

and how long did you wait?

jmckitrick18:01:07

Still waiting….

dpsutton18:01:23

run /Users/jmckitrick/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0\"\] -- repl :headless :host localhost (the exact same command) from a terminal and see if you get more output

jmckitrick18:01:30

Warning: implicit middleware found: cider-nrepl.plugin/middleware
Please declare all middleware in :middleware as implicit loading is deprecated. nREPL server started on port 50827 on host localhost - <nrepl://localhost:50827>

dpsutton18:01:29

what's your lein --version?

dpsutton18:01:43

try upgrading lein upgrade 2.9.1

jmckitrick18:01:05

So CIDER still won’t start the CLJ REPL, but in the terminal I don’t get the warning about middleware.

dpsutton18:01:20

and you're on 2.9.1?

dpsutton18:01:55

did you delete the shadow-cljs key from the project.clj file?

jmckitrick18:01:13

Yes and yes.

jmckitrick18:01:30

Now, for what it’s worth…

dpsutton18:01:35

can you try this?

dpsutton18:01:37

~/p/c/my-app ❯❯❯ lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0\"\] -- repl 
nREPL server started on port 34237 on host 127.0.0.1 - 
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.1
OpenJDK 64-Bit Server VM 11.0.5+10-post-Ubuntu-0ubuntu1.1
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> (+ 1 1)
2
user=> 

jmckitrick18:01:39

If I start CLJ first it works.

dpsutton18:01:00

oh interesting. let me try tat

jmckitrick18:01:21

So it seems I can start one or the other, but not both.

dpsutton18:01:14

[nREPL] Starting server via /home/dan/projects/node/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.2 -d cider/cider-nrepl:0.23.0 server
[nREPL] server started on 7002
[nREPL] Establishing direct connection to localhost:7002 ...
[nREPL] Direct connection to localhost:7002 established
Visit '' in a browser? (y or n) n
A session with the same parameters exists (clojure/my-app:localhost:7002).  You can connect a sibling instead.  Proceed? (y or n) y
[nREPL] Starting server via /home/dan/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0\"\] -- repl :headless :host localhost
[nREPL] server started on 36361
[nREPL] Establishing direct connection to localhost:36361 ...
[nREPL] Direct connection to localhost:36361 established
works for me. i have no idea. is your CIDER up to date?

dpsutton18:01:25

that's cljs and then clj

dpsutton18:01:04

and you're saying y to the sibling question?

jmckitrick18:01:22

Yes, CIDER 20200120.711

jmckitrick18:01:28

Wow, that stinks. I mean, I have had it running like that before, but not recently, and not with shadow, IIRC.

jmckitrick18:01:44

What luminus template params did you use?

dpsutton18:01:35

i think it was lein new luminus my-app +shadow

dpsutton18:01:41

or shadow-cljs. don't remember

jmckitrick18:01:00

Let me try one from scratch again.

jmckitrick18:01:20

Rats. I give up.

dpsutton18:01:51

i'm really sorry. would you like to try screensharing or something? that sucks that you can't get it going

dpsutton18:01:14

i can jump on a zoom and work with you if you have the time. or tomorrow if that's better for you

jmckitrick18:01:43

That would totally work for me.

jmckitrick18:01:50

I’m free for the next few hours anytime.

dpsutton18:01:00

Cool. In about an hour? I’ve got to do lunch first

jmckitrick18:01:47

No problem. Thanks!