Skip to content

feat: module system, bb CLI, regression test suite#7

Merged
BuddhiLW merged 2 commits intomainfrom
feat/module-system
Mar 19, 2026
Merged

feat: module system, bb CLI, regression test suite#7
BuddhiLW merged 2 commits intomainfrom
feat/module-system

Conversation

@BuddhiLW
Copy link
Owner

Summary

  • Module system (phases 1-4): clel.edn project descriptor, cross-file symbol table (two-pass), :refer :all wildcard imports, incremental compilation with mtime tracking
  • Babashka CLI: bin/clel script with compile + watch subcommands, bbin-installable
  • Compiler fixes: macro registry isolation in compile-project, strip leading dash in private fn names
  • Regression test suite: 73 tests, 190 assertions across 3 files using hive-test property macros (defprop-total, defprop-idempotent, defprop-complement), mutation tests, and gold snapshots

Test plan

  • clojure -M:test — all tests pass (73 regression + existing suite)
  • Gold snapshot tests lock in current emission for literals, core mappings, special forms, protocols, threading, destructuring
  • Mutation tests prove both bug fixes are load-bearing
  • Property tests verify totality, idempotency, complement across generated inputs

🤖 Generated with Claude Code

BuddhiLW and others added 2 commits March 19, 2026 13:21
defn- -name was compiling to ns---name (triple-dash). Now strips the
leading dash in both ns-qualify-name and emit-node :var, producing
ns--name (standard Elisp private convention). Also:
- eval-and-compile for runtime require (eager macro expansion)
- clojure-core-vector/list defvars restored in runtime

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three regression test files using hive-test property macros, mutation
testing, and gold snapshots to guard against compiler regressions:

- regression_naming_test: private fn triple-dash fix (f48384d)
  defprop-total, defprop-idempotent, defprop-complement, mutation test
- regression_compile_project_test: macro registry isolation (7f1debe)
  defprop-total, defprop-complement, defspec, mutation tests, integration
- regression_gold_test: exact-match snapshots for all emission categories
  literals, core mappings, special forms, ns, destructuring, protocols

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BuddhiLW BuddhiLW force-pushed the feat/module-system branch from d00016f to e30921d Compare March 19, 2026 16:22
@BuddhiLW BuddhiLW merged commit 3fd3493 into main Mar 19, 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