boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 180 forks source link

New task: bare-repl #582

Closed pesterhazy closed 7 years ago

pesterhazy commented 7 years ago

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:

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 to boot repl include:

alandipert commented 7 years ago

This looks juicy but doesn't merge quickly, can you please give it a look when you have a chance? Thanks :1st_place_medal:

Deraen commented 7 years ago

I wonder if this should be completely different task as the options probably differ heavily from nrepl options?

alandipert commented 7 years ago

That's a great point.

pesterhazy commented 7 years ago

Based on the feedback by @deraen et al, I've rebased on master and extracted a standalone task, bare-repl. It accepts only the --init, --init-ns and --eval options. What do you think @alandipert?

alandipert commented 7 years ago

:100: - Can you please add to CHANGES.md for this one too?

pesterhazy commented 7 years ago

@alandipert done

arichiardi commented 7 years ago

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 socket only . The default is to use the accept function that launches the repl but then an option can specify a symbol containing any accept function. We would mimic Clojure's behavior and make thing way more extensible: we have pods, so we could transparently handle the one socket for repl/one or more sockets for tooling.

pesterhazy commented 7 years ago

@arichiardi, did you mean to comment on this (already merged) PR: https://github.com/boot-clj/boot/pull/549? This PR is not about the socket server :)

arichiardi commented 7 years ago

Lol probably not :+1: