This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-11
Channels
- # announcements (6)
- # babashka (61)
- # beginners (85)
- # calva (21)
- # cider (6)
- # clara (9)
- # clj-http (1)
- # clj-kondo (35)
- # cljfx (6)
- # clojure (91)
- # clojure-australia (11)
- # clojure-europe (23)
- # clojure-italy (7)
- # clojure-losangeles (2)
- # clojure-nl (27)
- # clojure-uk (107)
- # clojurescript (4)
- # community-development (1)
- # cursive (69)
- # emacs (12)
- # fulcro (29)
- # graalvm (25)
- # honeysql (10)
- # hugsql (3)
- # integrant (13)
- # jobs (4)
- # kaocha (3)
- # keechma (1)
- # lambdaisland (3)
- # leiningen (2)
- # meander (17)
- # mount (3)
- # observability (1)
- # off-topic (86)
- # pathom (3)
- # polylith (2)
- # practicalli (14)
- # reitit (14)
- # shadow-cljs (61)
- # startup-in-a-month (1)
- # tools-deps (9)
- # vim (54)
- # xtdb (16)
I came up with a working PoC for injections using NREPL. Is there a more straight-forward way to accomplish this?
The injection in this case is requiring pprint
.
The code is easily referenced in a deps.edn alias:
:inject {:extra-deps {waffletower/repl-eval {:local/root "../repl-eval/"}
nrepl/nrepl {:mvn/version "0.7.0"}
refactor-nrepl/refactor-nrepl {:mvn/version "2.5.0"}
cider/cider-nrepl {:mvn/version "0.25.1"}}
:main-opts ["-m" "repl-eval.nrepl"]}
While I could refactor this to instrument variable middleware and injection forms, is there some hook I am missing here? It was much much easier and cleaner to accomplish REPL initialization with leiningen.I'm assuming by "injection" here you mean "evaluate some code on nREPL startup", right?
☝️ 3