Skip to content

Commit 2ffab17

Browse files
committed
One does not simply print REPL results with puget, alas.
1 parent f023609 commit 2ffab17

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

CHANGES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
the set of paths that will trigger a rebuild [#312][312].
4545
- The `watch` task now accpets `--debounce` option to adjust how long it will
4646
wait for all filesystem events to have fired before a rebuild is triggered.
47-
- The `repl` task now pretty-prints values via puget when printing in color.
4847

4948
##### API Functions
5049

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
(ns boot.repl-client
22
(:require
3-
[reply.main :as reply]))
3+
[reply.main :as reply]))
44

55
(def default-opts {:color true :history-file ".nrepl-history"})
66

7-
(defn cprint [x]
8-
(require 'puget.printer)
9-
((resolve 'puget.printer/cprint) (read-string x)))
10-
117
(defn client [opts]
128
(let [p (or (:port opts) (try (slurp ".nrepl-port") (catch Throwable _)))
139
h (or (:host opts) "127.0.0.1")
14-
o (let [o (assoc (merge default-opts opts) :attach (str h ":" p))]
15-
(if-not (:color o) o (-> o (dissoc :color) (assoc :print-value cprint))))]
10+
o (assoc (merge default-opts opts) :attach (str h ":" p))]
1611
(assert (and h p) "host and/or port not specified for REPL client")
17-
(future (require 'puget.printer)) ;; takes ~3s, preload while reply launches
1812
(reply/launch-nrepl o)))

0 commit comments

Comments
 (0)