Skip to content

v0.4.2: Fix macro registry arity mismatch in compile-project#6

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

v0.4.2: Fix macro registry arity mismatch in compile-project#6
BuddhiLW merged 2 commits intomainfrom
feat/module-system

Conversation

@BuddhiLW
Copy link
Owner

Summary

  • Fix macro registry isolation: clear registry between files in compile-project topo-order loop
  • Wrap macro apply in try-catch in analyze-seq and macroexpand-1-clel — arity mismatches fall through to normal invocation
  • Version bump to 0.4.2

Root cause

defmacro with Elisp &rest params (e.g. (defmacro foo [format-string &rest args] ...)) got eval'd into a shared macro registry during multi-file compilation. Later files calling those macros crashed with "Wrong number of args".

Verified

  • hive-emacs: 59 .el files compile successfully (was failing before)
  • 410 tests, 2306 assertions, 0 failures

🤖 Generated with Claude Code

BuddhiLW and others added 2 commits March 18, 2026 23:00
…ession)

- Wrap macro apply in try-catch in analyze-seq and macroexpand-1-clel;
  arity mismatches now fall through to normal invocation
- Clear macro registry between files in compile-project topo-order loop
- Fixes hive-emacs 58-file compilation that broke with v0.4.1

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