This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-13
Channels
- # announcements (2)
- # aws (4)
- # babashka (14)
- # beginners (186)
- # cljdoc (2)
- # cljsrn (7)
- # clojure (56)
- # clojure-austin (1)
- # clojure-australia (2)
- # clojure-europe (46)
- # clojure-france (5)
- # clojure-nl (16)
- # clojure-norway (7)
- # clojure-spec (76)
- # clojure-sweden (15)
- # clojure-uk (13)
- # clojurescript (60)
- # code-reviews (2)
- # conjure (8)
- # datascript (1)
- # datomic (4)
- # depstar (10)
- # emacs (9)
- # events (4)
- # exercism (1)
- # fulcro (36)
- # graalvm (8)
- # introduce-yourself (3)
- # jobs-discuss (2)
- # kaocha (14)
- # lsp (1)
- # minecraft (8)
- # new-channels (1)
- # off-topic (3)
- # pathom (6)
- # polylith (9)
- # re-frame (48)
- # shadow-cljs (5)
- # specter (26)
- # tools-deps (19)
- # vim (2)
- # vscode (1)
@plexus I started looking into integrating Kaocha and Calva last night and I found that it “just worked”
Do you know how Kaocha runs when Calva initiates a cider-nrepl test command?
Does koacha hook into clojure.test?
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.
I’ve found the nrepl-kaocha middleware: https://github.com/liquidz/kaocha-nrepl But unfortunately Calva doesn’t expose an extension point to allow folks to send custom nrepl commands.
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. 🙂