Fork me on GitHub
#nrepl
<
2019-06-25
>
bozhidar11:06:30

@pez I’m reasonably certain that after you clone the piggieback session it goes back to being a plain nREPL session.

bozhidar11:06:25

Inspecting the session bindings would answer this for certain. Btw, does this work for other cljs REPL types - e.g. a node or nashorn repl?

galvs11:06:26

Hi all. Im running an embedded nrepl inside a mixed java/clojure project. Is there anyway to expose a user.clj or equivalent for some start/reset/stop functions?

pez13:06:32

@bozhidar: I have a feeling it might not work with nashorn, because that would explain some of the problems i ran into when trying to reproduce some funky nrepl stuff a while ago. However, it does work with lein-figwheel, Figwheel Main, and shadow-cljs, which is why I have assumed I am doing things right... (They do not revert back to plain anything.)

pez13:06:38

So, maybe I should instead clone the clj repl and promote that one each time?

bozhidar13:06:41

> So, maybe I should instead clone the clj repl and promote that one each time?

bozhidar13:06:55

Probably. I’m certain this will work.

pez13:06:06

Is that how CIDER does it?

bozhidar13:06:10

CIDER never clones any existing sessions, so I never played much with this.

pez13:06:20

Interesting.

bozhidar13:06:00

I think you should at least open a ticket about this on nREPL (or piggieback’s repo), so we would investigate this further at some point.

pez13:06:31

I'll do that. What session bindings should I inspect?

bozhidar13:06:34

Close is supposed to clone most session bindings, but I don’t remember which one exactly.

pez13:06:39

I'll inspect some bindings and see if I can figure it out. 😃

pez13:06:51

I was certain that starting off with cloning the session you get when you connect was the way you should do it. So how does CIDER do these things?

bozhidar13:06:19

*cljs-repl-env* this one for instance.

bozhidar13:06:06

> I was certain that starting off with cloning the session you get when you connect was the way you should do it.

bozhidar13:06:05

CIDER sets up two basic sessions for each logical connection - one for evaluations and one for everything else (aka the tooling session). The second is cloned from the first.

bozhidar13:06:23

They can be upgraded to ClojureScript later if needed, but we always start off with Clojure sessions.

bozhidar13:06:43

I think that’s most historical. When the project was created ClojureScript simply didn’t exist.