Fork me on GitHub
#cider
<
2022-02-08
>
vemv11:02:22

ℹ️ clj-refactor.el 3.3.1, released today, honors .clj-kondo :unused-namespace config. That way, you can declare in a single place the namespaces that should never be cleaned (e.g. side-effectful ones) and have a variety of tools respect that setting.

🎉 4
Jim Newton17:02:26

can someone remind me how to run the test my cursor is sitting inside of using cider? I’m looking at https://docs.cider.mx/cider/testing/running_tests.html and I don’t quite see it.

dpsutton17:02:22

cider-test-run-test
  Command: Run the test at point.
?

Jim Newton17:02:25

ahh, thanks. it does not seem to be mentioned on that doc page 8-)

dpsutton17:02:39

fair. I just did m-x apropos [ret] cider-test and saw it in there

dpsutton17:02:56

in practice, i do m-x cider-test and see what is in the list and their docstrings

Jim Newton17:02:50

I was thinking that when I’m writing tests, If I’ve just finished a (deftest …) form and I prec C-c C-c to compile it, it would also be nice to run it. I.e., run the one test I just defined.

dpsutton17:02:09

yeah i think its just C-c C-t but i don’t remember offhand

Jim Newton17:02:53

Guess it is C-c C-t C-t

dpsutton17:02:39

ah yeah. that’s right

dpsutton17:02:48

need room in the chord to choose namespace, region, etc

Jim Newton17:02:54

my cat decided she either wants to type or block the screen

dpsutton17:02:12

they help as they are able

1
👍 1
winsome20:02:41

Does anybody know how to find the process id for the running clojure repl? I'm using jcmd to try to find the process I want to profile in VisualVM, but all of my repls have the same starting incantation, so I can't tell them apart

winsome20:02:59

└─> jcmd
795369 clojure.main -m nrepl.cmdline --middleware [refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]
786987 clojure.main -m nrepl.cmdline --middleware [refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]
921526 clojure.main -m nrepl.cmdline --middleware [refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]
930343 jdk.jcmd/sun.tools.jcmd.JCmd

magnars20:02:00

(.pid (java.lang.ProcessHandle/current))

winsome20:02:43

Perfect, thanks!

👍 1
Alex Miller (Clojure team)20:02:34

jps is the tool - I usually pass it some random set of args -m or -v or something, can never remember which is which

ag20:02:46

Hey folks, can someone please help me out with the right combination of vars? I have a leiningen project (all Clojure); I have shadow-cljs.edn in the same repo. All dependencies gotta be separated. That means I cannot initiate shadow-cljs watch/complile from Clojure REPL via shadow.cljs.devtools.api & shadow.cljs.devtools.server. So I did this in .dir-locals.el:

(cider-default-cljs-repl . shadow)
(cider-shadow-default-options . "app")
Now, when I do cider-jack-in-clj&cljs it still prompts me with: "Which command should be used... bla-bla". I don't want that prompt, right? So I set this up (cider-preferred-build-tool . "lein"). But then, it doesn't make CLJs REPL right. Instead of doing it separately, it starts lein REPL (which doesn't have the dependencies I need)

ag20:02:13

When I don't set cider-preferred-build-tool, I can create two separate REPLs, but I have to do it manually for each. When it prompts and I selected lein - it won't compile cljs. If I select shadow - it creates Cljs REPL and compiles cljs, but Clj REPL is now all messed up.

magnars20:02:59

Could you have two .dir-locals.el in different folders, and then start the repl you want by going to the correct folder?

ag20:02:08

I'm trying to reduce the "manual labor" here. Ideally, I want to run cider-jack-in-clj&cljs and get two REPLs. But I can't seem to find a way for them to spin out using different build tools