Kaocha follow-ups - #189
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #188. Fixes what the Kaocha migration missed, plus a few things found while checking it.
Regressions from #188:
clj -X:testbroke in generated projects — the:testalias lost:exec-fnand nothing replaced it. Restored there and inkit-core/kit-generator.:watch-testalias declared both:main-optsand:exec-args {:watch? true :fail-fast? true}, soclj -M:watch-testsilently 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 asbb test-watch. Generated projects get the same alias plusbb test-watchandmake test-watch, which conf: cognitect/test-runner -> Kaocha #188 didn't give them.humane-test-outputwas removed from the generated:testalias but left in:dev, where nothing activates it. Dropped.tests.ednnow declares the realtest/cljandsrc/cljpaths instead of relying on Kaocha'stest/srcdefaults. It worked by accident before.Pre-existing, found on the way:
kit-generator's:testalias 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-libsnow runs every lib suite that exists andbb ciincludes it, so CI covers them.File/isHidden, which only looks at a file's own name. A.clj-kondo/.cachedirectory 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.Makefilehad no.PHONY, somake testcollided with thetest/directory and printed "make: `test' is up to date" without running anything.core-testasserted(= 1 2), so every new project started with a red suite.Also documented how to run the tests in the README, including what
bin/kaochahardcodes (--plugin profiling, always on).Verified:
bb cigreen (kit-core 1 test, kit-generator 39 tests, template parity test), and a freshly generated project is green underclj -M:test,clj -X:test, andmake test, with no stray dot-directories.