Fork me on GitHub
#cider
<
2018-09-11
>
tatut06:09:42

I killed my repl buffer and now can’t start a new one due to cider--gather-session-params: Selecting deleted buffer, is there a way to clean up stale data?

tatut06:09:59

yes, that’s it

borkdude09:09:02

@tatut I think you need to do cider-quit and/or sesman-quit. I figured this out after trying. Still don’t know much about sesman, but it seems this is a new thing in cider.

manandearth09:09:18

Hi there, I was just asking this in the less crowded #luminus channel. How do I get cider working with the luminus web-dev template, it shoots up its own nrepl. and cider-connect comes up with :

manandearth09:09:22

>WARNING: CIDER requires cider-nrepl to be fully functional. Many things will not work without it!

kommen09:09:36

@adamgefen probably adding :plugins [[cider/cider-nrepl "x.y.z"]] to the project.clj should do the trick

manandearth10:09:33

@kommen I tried.. it comes with that same warning still

mitchelkuijpers10:09:54

Is anyone able to start 2 repls for the same project, we have a mixed clj&cljs project. And we used to start the clj part with clojure-cli and the cljs part with the built in shadow. I tried the cider-jack-in-clj&cljs but this makes a sibling cljs repl and I want a separate clj and cljs repl in different proceses. Am I doing something wrong? I also first got the warning that a session with the same parameters exist

mitchelkuijpers10:09:18

If I only run a clj repl or a cljs repl then it works perfectly, I tried figuring out how to start the shadow-cljs repl inside of clojure-cli but then I get some middleware error:

Can't change/establish root binding of: *nrepl-cljs* with set

thheller10:09:13

this means that you are missing the shadow-cljs nrepl middleware. https://shadow-cljs.github.io/docs/UsersGuide.html#_embedded_nrepl_server

thheller10:09:20

not sure where you can add it though

mitchelkuijpers11:09:10

Yeah me neither, I suspected this was the issue. But I would rather have cider do this otherwise I keep updating a list of middleware somewere.

mitchelkuijpers11:09:58

I am currently just running it outside of emacs and then connect by running shadow like this:

yarn shadow-cljs -d org.clojure/tools.nrepl:0.2.13 -d cider/piggieback:0.3.9 -d refactor-nrepl:2.4.0 -d cider/cider-nrepl:0.18.0 server

mitchelkuijpers10:09:39

And if I do: 1. jack-in-clj then it wil succesfully start a repl 2. jack-in-cljs Then I get a the warning session with the same parameters exist and the I say continue and it will print that it is starting and never finish starting..

manandearth10:09:16

more about my attempts with luminus: I tried also adding cider-nrepl as :plugins in a project.clj in the project directory as suggested in the cider guide: http://docs.cider.mx/en/latest/installation/#ciders-nrepl-middleware , still no functionality.

bozhidar12:09:17

> @tatut I think you need to do cider-quit and/or sesman-quit. I figured this out after trying. Still don’t know much about sesman, but it seems this is a new thing in cider.

bozhidar12:09:29

Yes, sesman (session manager) is our new connection management library. As 0.18 is the first release to incorporate it, it’s a bit rough around the edges, but your feedback is going to help us finetune it relatively quickly.

bozhidar12:09:06

@adamgefen How exactly are you starting nREPL within your project?

bozhidar12:09:32

> Is anyone able to start 2 repls for the same project, we have a mixed clj&cljs project. And we used to start the clj part with clojure-cli and the cljs part with the built in shadow. I tried the cider-jack-in-clj&cljs but this makes a sibling cljs repl and I want a separate clj and cljs repl in different proceses. Am I doing something wrong? I also first got the warning that a session with the same parameters exist

bozhidar12:09:38

@mitchelkuijpers Hmm, that’s an interesting use case we didn’t really consider, but I believe that issuing cider-jack-in-clj an cider-jack-in-cljs for your project will do exactly what you want to do.

mitchelkuijpers12:09:53

It starts.. but the second repl will never return it only says it is starting and then never create a cider buffer

bozhidar12:09:57

Well, that’s sounds like a bug you should definitely report then. Guess we messed something up.

bozhidar12:09:06

(you’ll get some prompt about creating a sibling connection instead, but you can just reply with No there)

manandearth12:09:18

@bozhidar the project is the first tutorial in "web development with clojure" downloaded from "the pragmatic bookshelf" website. I tried lein run the project then cider-connect to port 7000 which is where the luminus nrepl is running. I also tried lein repl and lein repl to a specific port (7000) then cider-connect. the only option that gives me cider functionality is running lein repl then cider connect to the default port, but then I get errors like some timestamp issue... (by the way by the term "functionality" I mean that cider-repl loads and the errors I get are of cider-repl)

shem12:09:56

i'm seeing the same problem as @mitchelkuijpers. it broke recently, maybe 0.18? before that clj&cljs repls started and worked nicely

mitchelkuijpers08:09:50

I created an issue for this: https://github.com/clojure-emacs/cider/issues/2447 if you have any other information please add it here.

bozhidar12:09:11

@shem This didn’t break - we intentionally changed it. 🙂 I didn’t imagine people wanted to start a couple of REPL servers for the same project. As I said - there’s still the option to start two independent REPLs using two consecutive jack-ins for the project.

bozhidar12:09:31

I’m just puzzled in general why would you want an independent Clojure and ClojureScript REPL.

mitchelkuijpers13:09:52

For us it is mainly because we don't want to figure out all the middleware in our clj repl that we need for the cljs-repl

mitchelkuijpers13:09:00

If we start two different processes it always works and cider will auto inject all the necessary middleware and dependencies.

bozhidar12:09:01

@adamgefen Just adding the cider-nrepl dep doesn’t do anything when using the embedded nREPL server - you actually have to pass the server cider’s nREPL handler or a vector of CIDER middlewares. From what you’re saying I’ll assume the tutorial project doesn’t do this.

manandearth12:09:35

@bozhidar got it. I'll try that.

shem12:09:57

@bozhidar the idea is just to have a usable repl for both clj and cljs. is the idea now to use one repl for both somehow? i tried again to replicate the problem and of course it works just fine this time…but on another machine yesterday i had to run the cljs repl on the command line because inside emacs it wouldn't connect

manandearth13:09:13

@bozhidar placed the handler, works a charm! thanks.

bozhidar13:09:58

You’re welcome!

bozhidar13:09:28

You might send a PR to this tutorial to include some info for CIDER users. Or add this to CIDER’s manual. 🙂

bozhidar13:09:05

@shem One nREPL server is capable of handling simultaneously Clojure and ClojureScript REPLs.

bozhidar13:09:49

We weren’t doing this in the past because of limitations of the old connection management API, but that’s generally the efficient approach to handling multiple connections.

dansmithy14:09:40

Hi - I've got a quick question about code completion. I see number alongside each completion option. How do I choose a particular number?

dansmithy14:09:16

See numbers on this screenshot:

manuel14:09:47

M+0 to select :keys* in the screenshot. 🙂

manuel14:09:42

(where M is Alt in Emacs vernacular)

👍 4
bozhidar14:09:57

You can also disable those numbers, but I don’t recall the exact setting that controls them.

manuel14:09:01

(setq company-show-numbers nil) to disable them

borkdude16:09:52

cider-restart -> wrong type argument processp, nil ? 🙂

bozhidar16:09:25

@borkdude Report this, please.

borkdude16:09:49

anyone else seeing this with cider 0.18, or is it a contextual problem? I’d like to know that first

borkdude16:09:14

I read somewhere that this could be a workaround for the other issue