I've had a small issue with some macros that use :forms meta data (like let does)
to provide a usage summary in documentation automatically. This is a quoted data structure, but it loses its quotes under import-vars (i.e., import-macro).
For instance,
(ns A)
(defmacro a
"doc"
{:forms '[(a [bbb] ccc)]}
[b]
`(list :do :something :with ~b))
(ns B
(:require potemkin A))
(potemkin/import-vars (A a))
will raise an error like
CompilerException java.lang.RuntimeException: Unable to resolve symbol: bbb in this context, compiling....
This isn't specific to :forms of course; I just happen to have a use for that case.
The same issue arises with quoted forms in metadata, with the quoted form losing its quoting protection when being expanded by import-vars and then apparently being evaluated/compiled subsequently.
Hey Zach,
Thanks for a great package here. It's very handy
I've had a small issue with some macros that use :forms meta data (like let does) to provide a usage summary in documentation automatically. This is a quoted data structure, but it loses its quotes under import-vars (i.e., import-macro).
For instance,
will raise an error like
CompilerException java.lang.RuntimeException: Unable to resolve symbol: bbb in this context, compiling....
This isn't specific to :forms of course; I just happen to have a use for that case. The same issue arises with quoted forms in metadata, with the quoted form losing its quoting protection when being expanded by import-vars and then apparently being evaluated/compiled subsequently.
Thanks,
Chris