This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-11
Channels
- # announcements (1)
- # babashka (70)
- # beginners (8)
- # calva (5)
- # cider (9)
- # clojure (48)
- # clojure-austin (68)
- # clojure-europe (29)
- # clojure-norway (30)
- # clojure-uk (5)
- # clojuredesign-podcast (2)
- # cursive (19)
- # datomic (10)
- # emacs (11)
- # events (2)
- # exercism (4)
- # fulcro (2)
- # hyperfiddle (29)
- # introduce-yourself (2)
- # jobs-discuss (4)
- # kaocha (1)
- # leiningen (8)
- # lsp (8)
- # malli (2)
- # matcher-combinators (20)
- # nrepl (15)
- # off-topic (33)
- # reagent (7)
- # releases (4)
- # shadow-cljs (42)
- # spacemacs (6)
- # sql (6)
- # squint (10)
- # vim (3)
I implemented support for that on https://github.com/afucher/clojure-repl-intellij plugin, but it doesn't seem to work the same as cider for emacs, and may not be related with load-file itself I suppose, the problem is that if I start the repl with
clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
and try to eval a namespace via load-file
, it doesn't eval the required namespaces first, I tried to understand if I should do something before checking the docs but couldn't find it.cider does something before start the repl, because it takes way more time to repl be ready, like it's loading the whole classpath or something, while starting the repl and calling the op load-file
is quite fast but doesn't load the deps it seems
I took a look on how cider
does things, and it seems to just call load-file
op as I'm doing, so I guess I'm missing something before, like when repl is starting
c/c @U051BLM8F (you probably know something about that 😛)
> and try to eval a namespace via load-file
, it doesn’t eval the required namespaces first,
can you be a bit concrete about this?
I mean, calling the nrepl op load-file
https://github.com/afucher/clojure-repl-intellij/blob/805374bfbc09ad27be9790472e1224c3aa67ff13/src/main/clojure/com/github/clojure_repl/intellij/nrepl.clj#L37
It turns out I was starting the repl in a project and evaluating from another one , even so it seems to be having some issues with external project ns, and I managed to repro with cider if I start the repl in terminal and connect from emacs, but only in a Nubank repo, will try to repro in a public sample one so I can share more details
anyway, thanks @U11BV7MTK! I let you know here if I find anything else
was interesting to see the hacks that nrepl goes through for the otherwise simple “load code”