-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repl-y running in a leiningen repl? #170
Comments
Hi Kim, nesting like this isn't currently possible (caveats below), but I agree it'd be great to have, if things could be reworked. Nesting a standalone (non-nrepl) instance underneath another standalone instance appears to work (via Nesting an attached nrepl instance (something like But as far as I can tell, nesting anything under an nrepl This might be a bit of a fundamental issue. The nrepl mode has to assume that execution happens in a separate process (even a remote machine!) - and since jline (and therefore reply) must use the terminal directly, there's no way to tell the server side of nrepl to access the client side's terminal. The nrepl mode normally breaks out of its execution processing when the remote end signals that it needs input via an nrepl-protocol message I can imagine a design like #116 to be an extensible path forward for spinning up sub-repls, but not sure whether that kind of thing would solve your issue or if you would need evaluated code to be the thing that triggers the sub-repl. Alternatively: maybe there's a way I'm missing to redesign the nrepl client code here in When you say "sub-environment", I'm not sure what level of sharing/separateness you'd want, but I imagine it'd be possible to either act on the same clojure runtime or spin up separate ones. I'm not going to have the bandwidth to implement this anytime soon, but if someone else does that'd be awesome! |
Thanks Colin. Since it is so seamless, I always manage to kind of ignore the I'm really only looking for a slightly more friendly I can live with My need isn't serious enough to try to dig into Thanks for the information. I really appreciate it! And thanks for |
I'm wondering if it is possible to kick off a
repl-y
while running in a leiningen repl which was started bylein repl
, and create a sort of "sub-environment" in the secondrepl-y
.I want to create a function someone can run at a regular lein repl that will create an environment and then kick off a
repl-y
repl that runs inside of that environment. When I try this, it does all of the initialization great, and then waits forever for input. I have to kill the terminal window, ultimately.I can create this sort of embedded or second repl with
clojure.main/repl
andclojure.main/repl-read
, but the user experience is, shall we say, a long way from that provided byrepl-y
.My question: should I be able to do this with
repl-y
? If so, I'll keep trying. But I am wondering if I'm simply trying to do something that is never going to work. If you know of any examples of this being done, I'd love a pointer to an example. I haven't been able to find one.I have successfully run
repl-y
standalone in an uberjar which I have made available to coworkers, and that works great (after you made it work for me some years ago). But that's just running onerepl-y
, not running one inside of another. But it does let me know thatrepl-y
doesn't need to be running with an nrepl to operate. A single standalonerepl-y
works great. I just want to run a standalone one inside another one.Thanks!
The text was updated successfully, but these errors were encountered: