This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-15
Channels
- # ai (35)
- # announcements (3)
- # babashka (16)
- # babashka-sci-dev (2)
- # beginners (37)
- # biff (16)
- # calva (5)
- # cider (2)
- # clj-commons (81)
- # clj-kondo (29)
- # cljfx (2)
- # cljs-dev (4)
- # clojars (4)
- # clojure (92)
- # clojure-europe (72)
- # clojure-losangeles (8)
- # clojure-nl (1)
- # clojure-norway (10)
- # clojure-uk (1)
- # clojurescript (20)
- # clojutre (2)
- # conjure (2)
- # data-science (18)
- # datomic (1)
- # emacs (10)
- # fulcro (49)
- # joyride (1)
- # kaocha (23)
- # leiningen (8)
- # lsp (14)
- # meander (5)
- # off-topic (93)
- # polylith (4)
- # re-frame (20)
- # reagent (9)
- # reitit (2)
- # remote-jobs (8)
- # sci (1)
- # shadow-cljs (21)
- # testing (3)
- # vim (27)
- # xtdb (35)
Some issues on the kaocha repo with more info about what people's needs are would be great. We do have it on our roadmap to provide better monorepo support, see https://github.com/lambdaisland/kaocha/issues/305 This would be fairly simple, a way of detecting tests.edn in nested projects and running the combined set of tests in a single process. No classloader separation which it seems polylith-kaocha does do. So I'm not sure to what extent this generic monorepo support would help polylith. I see only two open issues on polylith-kaocha so I assume that is working fairly well for people? (https://github.com/imrekoszo/polylith-kaocha/issues) Generally speaking any polylith specific stuff should happen in polylith-kaocha, *but* if polylith-kaocha needs certain affordances from kaocha to be able to do its job properly then we are interested in those, especially if they are generic affordances that could support multiple use cases.
polylith-kaocha does not expose kaocha-cli options. Actually, this is something that IMO would be needed.
the issue right now is most kaocha cli is private, not exposed interface. This means that if a project wants to integrate kaocha they need to: • A) make their own cli interface - people will need to learn it and they won't be able to reuse kaocha cli knowledge. • B) reimplement kacha CLI and try to follow kaocha - to benefit from existing kaocha cli knowlege. Right now maintenance in case B is quite big IMO
Can you elaborate? There's very little in kaocha that is private. But a cli interface meant for human consumption is not a good fit for building integrations on. That's why we provide kaocha.api. nothing's stopping you from calling kaocha.runner though or shelling out to kaocha.
That top level interface is very hard to reuse. We also have a separate kaocha-boot, because things are different when boot is in charge. It seems it's similar with polylith. It has its own cli tools and own rules.
just the fact that I dropped to default test runner on polylith because I had some issues . Default poly test runner is not great either - with regard to features. I hope I get some time to look into this. Poly tooling is not mature on testing side.
poly has its own command line tool through which devs interact with it, for example running poly test
which, in case of using the p-k integration layer would invoke kaocha through code.
I'm not fully up to date on how poly handles extra arguments but I think for people familiar with the kaocha cli it could be useful to be able to call say poly test -- --focus 'my.test.ns' --fail-fast --reporter debug
It would help an integration layer like p-k to not have to parse what comes after the --, just pass an arglist to kaocha
I think polylith-kaocha's only job is to make kaocha accessible through poly test
and not much else
thanks @U08BJGV6E for explainig what I could not 🙂
Hi guys, thanks for all the work that you are doing with this project. We are surfacing this issue https://github.com/lambdaisland/kaocha/issues/226 in our project. Should we create a new issue in github? Thanks one more time
I've reopened the ticket. Feel free to add more info if you think you can provide any extra useful information.
thanks a million @plexus
While working on polylith-kaocha I noticed that kaocha's 3 entry points (cli, -x, repl) seemingly reimplement common functionality with some subtle differences (like cloverage not being usable from repl/run). Because I wanted to support cloverage in p-k I had to again reimplement some of the stuff that -x does. @plexus would there be interest in spending some time refactoring the infrastructure around there so it's perhaps a little more straightforward to call a fully functional kaocha from code without the need to reimplement and without kaocha thinking it's being run directly from the command line?
Whether this would potentially be useful anywhere outside of polylith-kaocha, I don't know
It's a policy vs mechanism thing. Kaocha.api is mechanism (plumbing), it allows you to turn a test config into a test result, without caring how you end up with the config. kaocha.runner and kaocha.repl implement different policies about where the config comes from and what is done with the result (they are porcelain). That said there are some common things that could be handled in a middle layer, or in a utility namespace. A proposal for refactoring this is certainly welcome.
-X was added due to popular demand. I still do not see the point of it, and it does mean maintaining another entry point. People should use -m if they can.
Added https://github.com/lambdaisland/kaocha/issues/312 for this and included command-line args @U011NGC5FFY