This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-26
Channels
- # announcements (1)
- # beginners (42)
- # biff (11)
- # calva (15)
- # cider (3)
- # clj-http-lite (3)
- # clojure (52)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (39)
- # clojure-uk (4)
- # clojurescript (52)
- # code-reviews (13)
- # conjure (1)
- # cursive (4)
- # data-science (1)
- # datomic (5)
- # emacs (6)
- # events (3)
- # graalvm (5)
- # hyperfiddle (7)
- # kaocha (14)
- # lsp (11)
- # malli (3)
- # nbb (13)
- # off-topic (87)
- # pathom (15)
- # polylith (23)
- # portal (5)
- # reitit (4)
- # shadow-cljs (110)
- # squint (114)
- # testing (1)
- # vim (13)
hi, does anyone using/interested in kaocha with hyperfidle-rcf in a polylith project ? I'm trying to figure out how to run RCF tests in my source files and it does not seem to work, not sure yet why. I created a repro here: https://github.com/imrekoszo/polylith-kaocha/pull/7 . Hints / help is appreciated
Would you mind creating an issue in the kaocha repo regarding RCF? It's not something we've looked into before, but perhaps it makes sense to have an explicit kaocha-rcf test type implementation. I see they have clojure.test support, so maybe that's enough, but maybe it makes sense to have more direct support.
That’s what I was recommending to Eugen before. To me it appears these are a different test type. If nothing more, they would probably benefit from being discovered not only from test-paths but src-paths as well
thanks for the feedback @U08BJGV6E. FYI, I added an example projectc -> rfc in polylith-kaocha PR. bare kaocha in bases/rfc works fine. Tests in src/ are discovered:
cd bases/rfc && clojure -M:itest-runner
--- unit (clojure.test) ---------------------------
polylith-kaocha.rcf.sample-test
RCF__4
RCF__4✅
polylith-kaocha.rcf.test-ns
RCF__4
RCF__4✅
polylith-kaocha.rcf.src-ns
RCF__polylith-kaocha_rcf_src-ns__4
RCF__polylith-kaocha_rcf_src-ns__4✅
--- generative-fdef-checks (clojure.spec.test.check) ---------------------------
3 tests, 3 assertions, 0 failures.
Tests with polylith-kaocha are not discovered under src/hi, in orther to solve the above + some more. I am trying to expose the kaocha cli api or something very similar in polylith-kaocha . I checked kaocha.runner ns but I saw most of the things there are private. Any ideas on how I might best do this? Should I just copy paste the values / functions and update them ?
kaocha.runner is not an extension API, it's specifically an entry point for use from a terminal. For any kind of programmatic access you want to use kaocha.api. You can look at kaocha.runner, kaocha.repl, kaocha-boot, as examples of how to create an entry point based on kaocha.api.
Would this help for supporting polylith? https://github.com/lambdaisland/kaocha/issues/305
the description relates to how polylith projects are organized and work. I don't know if that is the cause
I found when working on polylith-kaocha that kaocha itself seemingly has some amount of logic duplication between its repl/main/-X entry points. I also seem to remember about some discussion somewhere mentioning that cleanup/refactor towards DRY would be beneficial there. I’m wondering if that’s still the case and whether something reusable could fall out of that.