Fork me on GitHub

thanks for the heads-up!

Marc O'Morain08:09:11

@plexus I started looking into integrating Kaocha and Calva last night and I found that it “just worked”

Marc O'Morain08:09:59

Do you know how Kaocha runs when Calva initiates a cider-nrepl test command?

Marc O'Morain08:09:42

Does koacha hook into clojure.test?


it probably doesn't run at all?


Calva probably uses clojure-test directly

Marc O'Morain10:09:53

Hrm, I must have been mistaken last night. I’m getting now getting the behaviour that you (and I expect) - when I run Calva’s commands to test the current namespace, it issues test commands to the cider-nrepl test middleware, which runs tests using the clojure.test runner. I’d like to somehope wire this up so that I can run Kaocha commands from Calva. We use Kaocha for most projects in CircleCI, and a lot of developers use Calva.

Marc O'Morain10:09:51

I’ve found the nrepl-kaocha middleware: But unfortunately Calva doesn’t expose an extension point to allow folks to send custom nrepl commands.

Marc O'Morain10:09:04

One way to do this might be have Calva expose an API that exposes allows users to issue nrepl commands, and build a new extension that relies on Calva, that adds Kaocha commands.


it's a missed opportunity that kaocha-nrepl uses custom nREPL ops, I think the better way would be to adhere to the contract of cider.middleware.nrepl/handle-test, so you can swap out the middleware (or have it occur earlier in the stack)


Does kaocha support the newer :exec-fn tools-deps feature? I think all it needs is an entrypoint fn that can take a map arg. it looked like kaocha.runner/run might work, but wasn't sure if it skipped some important init / sanity check code. anyone try that yet?


on closer inspection kaocha.runner/run looks a little too low-level for that. ideally I think we'd want a new / slightly refactored equivalent of kaocha.runner/main*


Anyway, just submitted a PR that adds -X support in the easiest way I could see to do it. Let me know if it should be more simple and less easy, as Rich might put it. 🙂

🙌 4