Fork me on GitHub

Is there a known issue with macros in ClojureScript code? I get warnings about unresolved vars whenever I use a macro that comes from a cljs namespace but is defined in a clj namespace.


"that comes from", do you mean "used in"?


The macro is defined in foo.clj, there's also a foo.cljs and the consuming code is at bar.cljs


can you make a small repro that I can clone and lint?


There's a special invocation that I forget that makes this work


Sure, I'm on my mobile but I will try later tonight. Three separate files or does a text block here work?


> that I can clone and lint? 


Turns out I can't reproduce. Might have been some cache issue on my local repo....


The case I have in mind is but I will also make a repro later

Jacob Rosenzweig20:11:26

Is there a way to force clj-kondo in vscode to resolve macros from a dep that it just doesn't want to load?


what is "it" in your question, clj-kondo?

Jacob Rosenzweig21:11:12

The default clojure plugin for VSCode.


You can probably solve this with {:lint-as {play-clj.core/defscreen clj-kondo.lint-as/def-catch-all}}in your clj-kondo config

Jacob Rosenzweig21:11:24

Oh stupid, I have the wrong root folder opened.

Jacob Rosenzweig21:11:39

But yes, that's unrecognized macros function is neat. Thanks for that nugget.

Jacob Rosenzweig21:11:35

Now that I think about it, it could even just be the linter itself bugging out. Though it shows a clj-kondo error when I hover over it.