You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although I have (set! *print-meta* true) at the REPL, when I do C-c RET on some macro form, the resulting *cider-macroexpansion*'s contents are not printed with their metadata.
This breaks debugging macroexpansion for me. I have macros that expand to code containing other macro calls, and I pass essential data from the outer macros to the inner macros using metadata. The expansion works correct in clojure, but I can't do it stepwise for debugging purposes in CIDER because the metadata isn't printed in the *cider-macroexpansion* buffer, and so expanding a macro in the expansion won't work.
Here is a minimal example that demonstrates the issue:
Compiling the buffer prints 8, so the macroexpansion in Clojure works just fine. However, when you expand the (defun plus-1...) with CIDER, you cannot expand the resulting (defun-1 plus-1...) form anymore because the :foo metadata which defun attaches to the symbol plus-1 is gone (not printed).
So I'd be very happy with some customization option for enabling printing of metadata with CIDER macroexpansion. Alternatively, it could also just honor the *print-meta* value in the REPL.
The text was updated successfully, but these errors were encountered:
@tsdh I've added the cider-macroexpansion-print-metadata option; setting that to true will cause the metadata to be printed. You might need a lein -U deps to grab the latest cider-nrepl if your lein has already checked today.
Although I have
(set! *print-meta* true)
at the REPL, when I do C-c RET on some macro form, the resulting*cider-macroexpansion*
's contents are not printed with their metadata.This breaks debugging macroexpansion for me. I have macros that expand to code containing other macro calls, and I pass essential data from the outer macros to the inner macros using metadata. The expansion works correct in clojure, but I can't do it stepwise for debugging purposes in CIDER because the metadata isn't printed in the
*cider-macroexpansion*
buffer, and so expanding a macro in the expansion won't work.Here is a minimal example that demonstrates the issue:
Compiling the buffer prints 8, so the macroexpansion in Clojure works just fine. However, when you expand the
(defun plus-1...)
with CIDER, you cannot expand the resulting(defun-1 plus-1...)
form anymore because the:foo
metadata whichdefun
attaches to the symbolplus-1
is gone (not printed).So I'd be very happy with some customization option for enabling printing of metadata with CIDER macroexpansion. Alternatively, it could also just honor the
*print-meta*
value in the REPL.The text was updated successfully, but these errors were encountered: