-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
New task: bare-repl #582
New task: bare-repl #582
Conversation
boot/pod/src/boot/repl.clj
Outdated
@@ -58,3 +58,8 @@ | |||
[{:keys [bind port init-ns middleware handler] :as options}] | |||
(let [opts (->> options setup-nrepl-env!)] | |||
(@start-server opts))) | |||
|
|||
(defn launch-bare-repl | |||
[opts] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we document the options? https://clojure.github.io/clojure/clojure.main-api.html#clojure.main/repl
boot/pod/src/boot/repl.clj
Outdated
(defn launch-bare-repl | ||
[opts] | ||
(require 'clojure.main) | ||
((resolve 'clojure.main/repl))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably you have forgotten to pass the options here.
This looks juicy but doesn't merge quickly, can you please give it a look when you have a chance? Thanks 🥇 |
I wonder if this should be completely different task as the options probably differ heavily from nrepl options? |
That's a great point.
|
26e3750
to
f230f5d
Compare
Based on the feedback by @Deraen et al, I've rebased on master and extracted a standalone task, bare-repl. It accepts only the |
💯 - Can you please add to CHANGES.md for this one too? |
4d93c09
to
ac13ced
Compare
@alandipert done |
Sorry if this come out it the blue but these has been a lot of discussion around repls in #unrepl lately and I was thinking that this task could be named |
@arichiardi, did you mean to comment on this (already merged) PR: #549? This PR is not about the socket server :) |
Lol probably not 👍 |
This PR adds a new bare-repl task to start a "bare" or terminal repl, as per clojure.main/repl.
A bare repl has a few advantages over the nREPL-based
boot repl
setup:boot repl -B
but not withboot repl
:(.readPassword (System/console) "Password: " (object-array []))
Like the normal
repl
task when not invoked with the-s
option,boot bare-repl
blocks the boot pipeline until the repl is closed with^D
.Essentially the bare REPL is closer to what you get when following Clojure's Getting Started guide. Disadvantages of
boot bare-repl
compared toboot repl
include:rlwrap boot repl -B
works well)