Fork me on GitHub
Ian Fernandez11:04:48

Hello, how can I search a function signature that resembles my macro signature?

Ian Fernandez11:04:55

I've tried to lint a macro like clojure.core/def and I got warning: inline def


@d.ian.b What does your macro look like when called?

Ian Fernandez11:04:46

aw, changed to var and looks cool

Ian Fernandez11:04:02

another one that I can't find resemblance is

Ian Fernandez11:04:23

(defmacro spy-on [fun-monitor-pair & body] ,,,,

Ian Fernandez11:04:18

(helpers/spy-on [fn1 fn1-mon fn2 fn2-mon] (body) )


looks like clojure.core/let to me

Ian Fernandez11:04:04

: error: unsupported binding form a-namespace/fn1


it seems you have not given me the example like you are calling it

Ian Fernandez11:04:39

for (helpers/spy-on [a-namespace/fn1 fn1-mon] (body) )


can you try clojure.core/binding?

Ian Fernandez11:04:35

error: unresolved symbol fn1-mon


so where is fn1-mon coming from?

Ian Fernandez11:04:20

is a name that i'm giving


so you have the name on the right instead of most macros which have the name on the right. that makes it incompatible

Ian Fernandez11:04:56

it's like inside a macro, i'm creating an atom named of this


maybe you could try changing your macro. and else: {:linters {:unresolved-symbol {:exclude [(foo.helpers/spy-on)]}}}


I think in your code binding should work, if you reverse names to the left

Ian Fernandez11:04:25

Yeah, I will try this 😃

Ian Fernandez12:04:15

fixed the order of macro call, clojure.core/let did the job

Ian Fernandez12:04:59

It wasn't me that made the macro =(


cool 🙂 preventing the Lisp curse with clj-kondo