Skip to content

v0.4.1: Module system, incremental compile, Babashka CLI#5

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

v0.4.1: Module system, incremental compile, Babashka CLI#5
BuddhiLW merged 10 commits intomainfrom
feat/module-system

Conversation

@BuddhiLW
Copy link
Owner

Summary

  • Module system phases 3-4: :refer :all wildcard imports + incremental compilation with .clel-cache/manifest.edn mtime tracking
  • Babashka CLI: Replaced Go CLI wrapper with bb script — installable via bbin install io.github.BuddhiLW/clojure-elisp
  • Watch command: Polling-based .cljel file watcher with auto-recompile

Changes

  • src/clojure_elisp/analyzer.clj:refer :all support in parse-require-spec + build-ns-env
  • src/clojure_elisp/core.clj — Incremental compilation (manifest read/write, stale detection, dependency propagation)
  • bb/clel/main.clj — Babashka CLI with compile/watch/version subcommands
  • bb/clel/watch.clj — Polling file watcher with debounce
  • bb.edn — bbin-installable config
  • bin/clel — Thin bb launcher
  • README.md — Updated installation docs, bbin instructions
  • Version bump to 0.4.1 across all 6 locations

Test plan

  • 427 tests, 2398 assertions, 0 failures
  • bin/clel versionclel 0.4.1
  • bb -m clel.main versionclel 0.4.1
  • make build install~/.local/lib/clel.jar updated

🤖 Generated with Claude Code

BuddhiLW and others added 10 commits March 18, 2026 19:32
- Add read-project-config and compile-project-from-config to core.clj
- Support :source-paths, :output-dir, :runtime (:bundled/:require) in clel.edn
- CLI compile command now accepts zero args — finds clel.edn walking up from CWD
- Add examples/multi-module/ with two-namespace example project
- 413 tests, 2318 assertions, 0 failures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add *project-exports* dynamic var for project-wide symbol visibility
- analyze-symbol emits WARNING to stderr for unresolved qualified refs
- Add scan-exports public API in analyzer
- build-project-symbol-table does Pass 1 scan of all .cljel exports
- compile-project now two-pass: survey exports, then compile with checks
- 412 tests, 2332 assertions, 0 failures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve test file conflict — both branches added tests to core_test.clj,
keep both test suites.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace Go CLI wrapper with a Babashka script (bin/clel) that supports:
- clel compile (zero-arg, uses clel.edn project config)
- clel compile <file.cljel> [-o out.el]
- clel compile <dir/> [-o outdir/]
- clel version

Prefers uberjar ($CLEL_JAR or ~/.local/lib/clel.jar), falls back to
clojure -M -e for compilation. Propagates subprocess exit codes cleanly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add bb/clel/watch.clj — a Babashka-compatible namespace that watches
a directory for .cljel file changes and recompiles via polling.
Uses babashka.fs/glob + last-modified-time comparison instead of
fsnotify (unavailable in Babashka). Accepts a compile-fn callback
so the caller controls compilation dispatch (jar vs clojure CLI).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move CLI logic from bin/clel into bb/clel/main.clj as a proper
namespace (clel.main), make bin/clel a thin launcher that requires
and delegates to it, and add :bbin/bin to bb.edn so the tool can
be installed with `bbin install`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BuddhiLW BuddhiLW merged commit 33d8c34 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