Fork me on GitHub
#cider
<
2020-04-22
>
pinkfrog03:04:00

say I add a new dependency to the project.clj. Should I restart emacs to activate that package ?

dpsutton03:04:25

not emacs. just CIDER

dpsutton03:04:36

cider-quit and then jack-in again

dpsutton03:04:01

emacs is just running clj/lein/shadow/boot underneath. just have to restart that process

dpsutton03:04:13

i think sesman-restart might accomplish this?

pinkfrog03:04:10

cool. thanks.

cider 4
pinkfrog03:04:28

I found clj-refactor has a hot load dependency option.

bozhidar05:04:27

It had it, not anymore. Now you’ll just see a warning if you try to use it. We’ll implement hotloading in CIDER one of those days, but it’s not a high priority right now.

pinkfrog03:04:57

I kinda feel things are quite separated. why isn’t such functionalities being incorporated into cider itself?

dpsutton03:04:32

do you use clj-refactor?

dpsutton03:04:17

it seems like the ask is for one jar instead of two jars? not sure what you gain. its nice that its optional i think. i don't actually use it

pinkfrog03:04:53

cider-quit seems not make it. it restarts the repl connection, not the repl server itself.

dpsutton03:04:35

did you cider-connect or cider-jack-in?

dpsutton03:04:35

cider-quit should kill the subprocess if you started one

pinkfrog04:04:12

never mind. i copy-pasted something wrong.

Spaceman12:04:05

how do I refresh a cljs repl in cider

Spaceman12:04:58

When I use M-x cider-refresh, it says that no clojure repl found in the current buffer

dominicm12:04:48

There's no equivalent function in cljs.

dpsutton12:04:28

If you’re browser based just reload the page

dominicm13:04:04

Yeah, most likely you have hot refresh and you need to run code to do something with that new code. Eg Re-run a function

Spaceman14:04:37

How to run cljs tests in cider?

Spaceman14:04:52

C-c C-t n doesn't work. I get clojure only operation requested in clojurescript buffer

Felipe Marques23:04:47

I haven't take a look yet. But I saved this link to do some keybinding that would run tests in cljs: http://adereth.github.io/blog/2014/05/29/custom-clojure-evaluation-keybindings-in-emacs/

Felipe Marques13:04:56

(defun run-cljs-test-in-ns ()
    (interactive)
    (cider-interactive-eval "(cljs.test/run-tests)"))

  (spacemacs/set-leader-keys-for-major-mode 'clojurescript-mode "o t n" 'run-cljs-test-in-ns)

Felipe Marques13:04:28

This allow me to run the tests in the buffer using key-bindings, but it does not do any formatting or reporting, you must have the repl open to see the results.

Spaceman19:04:00

Is there a plugin to do the formatting or reporting? If not, then how can I write one? Surely it can't be that hard, right? Just highlight every thing that's PASS as green and FAIL as RED etc., only I need help on where to start. And then to display everything in a new buffer, like cider test-runner does. Well, to start with, suppose I want the display the results of (cljs.test/run-tests) to output to a new buffer in cider mode, and that I can use "q" to quit that buffer, that would be a good start...

Felipe Marques12:04:33

I imagine there are commands for highlighting and formatting the buffer. You will probably have to parse the output of the cljs.tests/run-tests to do it. But I don't know this commands.

Felipe Marques12:04:59

I'm new to hacking Emacs, so I can't help much, sorry.

dominicm20:04:33

Clojurescript tests aren't supported

Spaceman20:04:31

is there a good third-party solution that can be integrated within cider?

dpsutton20:04:13

for testing?

dominicm20:04:30

Isn't there a kaocha.el

Spaceman20:04:51

yes for testing. kaocha? Should I use that?

dpsutton20:04:50

read into it

dpsutton20:04:53

might be up your alley

dpsutton20:04:10

i don't know of a good cljs testing strategy integrated with cider though

zane21:04:06

One could use cider to run kaocha.repl/run.

zane21:04:13

Not sure if that qualifies as “integrated”.

bozhidar07:04:18

Well, the simplest approach would be to just run the tests via the eval op and parse the output of the report. It’s not complex, but no one expressed much interest to work on this.

bozhidar07:04:22

With Clojure the integration was much simpler - as we could simply tweak the test runner directly and run whatever we wanted server-side, but we can’t do the same for ClojureScript.