lambdaisland

richiardiandrea 2025-04-09T13:25:11.861709Z

is anybody using launchpad to run kaocha tests? it is so convenient I want to use it for everything now 😄

teodorlu 2025-04-11T07:15:39.281279Z

aaah, right, good point. I don't how to use deps.local.edn via babashka tasks (yet). In that case, I'm also curious about further answers to this thread!

richiardiandrea 2025-04-10T21:22:56.177799Z

the nice thing is that launchpad uses deps.local.edn

richiardiandrea 2025-04-10T21:23:46.409639Z

that is why I was trying to use that..I can specify any alias (including ones in $HOME/.clojure ) without ever committing any code

2025-04-13T15:34:55.562739Z

Using a bash script to invoke Kaocha is quite straight forward. 1. create a bin/kaocha file 2. chmod +x bin/kaocha 3. put the below content inside of it.

#!/bin/bash

exec clojure -A:test -M -m kaocha.runner "$@"

teodorlu 2025-04-09T16:41:38.751969Z

I tend to use babashka tasks for this. If you have Launchpad, you probably already have a bb.edn file. Something like this:

;; in bb.edn
{:tasks
 {test (apply clojure "-M:kaocha" *command-line-args*)}}
(depending on your deps.edn Kaocha alias!) Then bb test, bb test --watch, bb test --help, you name it.

👍 1
richiardiandrea 2025-04-09T13:26:03.974209Z

I tried

:alias {:launchpad/kaocha
         {:main-opts ["-m" "kaocha.runner" "--watch"]}}
But it fails cause probably it still want to drop me into a REPL or something