Skip to content

Kaocha follow-ups - #189

Merged
yogthos merged 1 commit into
masterfrom
fix/kaocha-followups
Aug 7, 2026
Merged

yogthos merged 1 commit into
masterfrom
fix/kaocha-followups

Conversation

@yogthos

@yogthos yogthos commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #188. Fixes what the Kaocha migration missed, plus a few things found while checking it.

Regressions from #188:

  • clj -X:test broke in generated projects — the :test alias lost :exec-fn and nothing replaced it. Restored there and in kit-core/kit-generator.
  • The root :watch-test alias declared both :main-opts and :exec-args {:watch? true :fail-fast? true}, so clj -M:watch-test silently ran a one-shot suite. It's now :test-watch, meant to be combined with :test (clj -M:test:test-watch) so the deps aren't duplicated, and it's wired up as bb test-watch. Generated projects get the same alias plus bb test-watch and make test-watch, which conf: cognitect/test-runner -> Kaocha #188 didn't give them.
  • humane-test-output was removed from the generated :test alias but left in :dev, where nothing activates it. Dropped.
  • Generated tests.edn now declares the real test/clj and src/clj paths instead of relying on Kaocha's test/src defaults. It worked by accident before.

Pre-existing, found on the way:

  • kit-generator's :test alias had no :extra-paths ["test"], so its 39 tests had never run. conf: cognitect/test-runner -> Kaocha #188 added the path; nothing ran them. bb test-libs now runs every lib suite that exists and bb ci includes it, so CI covers them.
  • The template copier filtered on File/isHidden, which only looks at a file's own name. A .clj-kondo/.cache directory sitting in the template resources was copied into generated projects, and would have been baked into a released template jar. Now any path with a hidden segment is skipped.
  • The generated Makefile had no .PHONY, so make test collided with the test/ directory and printed "make: `test' is up to date" without running anything.
  • The placeholder core-test asserted (= 1 2), so every new project started with a red suite.

Also documented how to run the tests in the README, including what bin/kaocha hardcodes (--plugin profiling, always on).

Verified: bb ci green (kit-core 1 test, kit-generator 39 tests, template parity test), and a freshly generated project is green under clj -M:test, clj -X:test, and make test, with no stray dot-directories.

…lias

The Kaocha switch dropped :exec-fn from the generated project's :test alias,
so clj -X:test stopped working there. Restored it, and in kit-core and
kit-generator.

kit-generator's :test alias never had :extra-paths ["test"], so its 39 tests
had never actually run. bb test-libs now runs the suite of every lib that has
one, and bb ci includes it.

Replaced the root :watch-test alias with :test-watch, meant to be combined
with :test so the deps aren't duplicated. It declared both :main-opts and
:exec-args, so clj -M:watch-test silently ignored watch and fail-fast.
Generated projects get the same alias plus bb and make tasks.

Fixed a few things found along the way: the template copier only skipped
hidden files, so a local .clj-kondo/.cache sitting in the template resources
was copied into generated projects and would have been baked into a released
template jar; the generated Makefile had no .PHONY, so make test collided with
the test/ dir and did nothing; and the placeholder core-test asserted (= 1 2),
so every new project started red.
@yogthos
yogthos merged commit 9920e90 into master Aug 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant