Skip to content

Commit 20c7c8b

Browse files
alias: add clojure.main/repl-requires to rebel readline
add-libs load when a repl is detected, although rebel readline does not load without modification the `clojure.repl.deps` namespace can be required once the repl starts require `clojure.main/repl-require` within the alias to load `clojure.repl.deps` during startup, which also loads source and doc functions
1 parent 178ece9 commit 20c7c8b

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*** ci: MegaLinter Java Image version v6.22.2
1717
*** ci: setup-clojure version 10.3
1818
*** inspect: portal version 0.38.2
19+
*** alias: update rebel readline aliases to load `clojure.main/repl-requires` to include add-lib, add-libs and sync-deps for hotloading libraries on the classpath
1920

2021
* 2023-03-25
2122
** Added

deps.edn

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@
222222
{:extra-deps {nrepl/nrepl {:mvn/version "1.0.0"}
223223
cider/cider-nrepl {:mvn/version "0.30.0"}
224224
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
225-
:main-opts ["-m" "nrepl.cmdline"
225+
:main-opts ["-e" "(apply require clojure.main/repl-requires)"
226+
"-m" "nrepl.cmdline"
226227
"--middleware" "[cider.nrepl/cider-middleware]"
227228
"--interactive"
228229
"-f" "rebel-readline.main/-main"]}
@@ -247,7 +248,8 @@
247248
org.clojure/test.check {:mvn/version "1.1.1"}
248249
ring/ring-mock {:mvn/version "0.4.0"}
249250
criterium/criterium {:mvn/version "0.4.6"}}
250-
:main-opts ["-m" "nrepl.cmdline"
251+
:main-opts ["-e" "(apply require clojure.main/repl-requires)"
252+
"-m" "nrepl.cmdline"
251253
"--middleware" "[cider.nrepl/cider-middleware,portal.nrepl/wrap-portal]"
252254
"--interactive"
253255
"-f" "rebel-readline.main/-main"]}
@@ -257,7 +259,8 @@
257259
cider/cider-nrepl {:mvn/version "0.30.0"}
258260
com.billpiel/sayid {:mvn/version "0.1.0"}
259261
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
260-
:main-opts ["-m" "nrepl.cmdline"
262+
:main-opts ["-e" "(apply require clojure.main/repl-requires)"
263+
"-m" "nrepl.cmdline"
261264
"--middleware" "[com.billpiel.sayid.nrepl-middleware/wrap-sayid,cider.nrepl/cider-middleware]"
262265
"--interactive"
263266
"-f" "rebel-readline.main/-main"]}
@@ -268,7 +271,8 @@
268271
refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}
269272
com.billpiel/sayid {:mvn/version "0.1.0"}
270273
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
271-
:main-opts ["-m" "nrepl.cmdline"
274+
:main-opts ["-e" "(apply require clojure.main/repl-requires)"
275+
"-m" "nrepl.cmdline"
272276
"--middleware" "[com.billpiel.sayid.nrepl-middleware/wrap-sayid,refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"
273277
"--interactive"
274278
"-f" "rebel-readline.main/-main"]}
@@ -278,7 +282,8 @@
278282
;; CIDER: run `cider-connect-cljs` and select REPL host and port, figwheel-main and dev build
279283
:repl/rebel-cljs
280284
{:extra-deps {com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
281-
:main-opts ["-m" "rebel-readline-cljs.main"]}
285+
:main-opts ["-e" "(apply require clojure.main/repl-requires)"
286+
"-m" "rebel-readline-cljs.main"]}
282287

283288
:lib/rebel
284289
{:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}}

0 commit comments

Comments
 (0)