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?
there's a little bit of docs here but not much https://cljdoc.org/d/lambdaisland/kaocha/1.91.1392/api/kaocha.report#fail-summary
this is my full code https://gist.github.com/jyn514/d92ba395b0375f8b2414a4191342f5a0
(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"]}}