kaocha 2026-06-09

yoooo i found out how to fix kaocha's error reporting to be easy to read when there's a syntax error

ERROR in unit (file:/Users/jyn/src/clojure/paracress/test/flower/scripts_test.clj:35)
Failed reloading flower.scripts-test:
Exception: Syntax error reading source at (flower/scripts_test.clj:463:1).
  --> test/flower/scripts_test.clj:10:1
  10 | (load-file "scripts/spec_readability_review.clj"
       ^ form starts here
  note: EOF while reading, starting at line 10
1 tests, 1 assertions, 1 errors, 0 failures.

the trick is to add a (defmethod kaocha-report/fail-summary :error)

hi jyn 👋🏻 that sounds interesting, can you elaborate?

(note that this code is LLM generated in case that bothers you)

it's interesting as a PoC, would love to see a write-up of the current behaviour, and the problem's we're trying to solve. I like the general direction, kaocha definitely wants to provide good ergonomics, but there are trade-offs, and I don't currently have the full picture. For example, it seems you're not emitting a stack trace? that's pretty useful information

i don't have a stacktrace for compiler errors, under the assumption that you don't want to show compiler internals. i believe i have a stacktrace for everything else, if i don't that's a bug

i also have this configuration locally in tests.edn:

:bindings {kaocha.stacktrace/*stacktrace-stop-list* ["kaocha.runner" "kaocha.type" "kaocha.watch"]
            kaocha.stacktrace/*stacktrace-filters* ["" "clojure.lang" "sci.impl" "clojure.core.protocols" "clojure.tools.reader"]}}