This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-25
Channels
- # announcements (1)
- # asami (3)
- # aws (2)
- # babashka (8)
- # beginners (60)
- # biff (3)
- # calva (45)
- # clj-http (3)
- # clj-kondo (19)
- # clojure (50)
- # clojure-europe (23)
- # clojure-nl (8)
- # clojure-spec (4)
- # clojure-uk (3)
- # clojurescript (32)
- # conjure (3)
- # datomic (7)
- # events (2)
- # fulcro (24)
- # graalvm (3)
- # inf-clojure (3)
- # jackdaw (1)
- # lsp (3)
- # malli (8)
- # missionary (14)
- # off-topic (1)
- # polylith (3)
- # portal (11)
- # rewrite-clj (63)
- # shadow-cljs (21)
- # spacemacs (7)
- # tools-build (6)
- # xtdb (4)
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.
The macro is defined in foo.clj, there's also a foo.cljs and the consuming code is at bar.cljs
Sure, I'm on my mobile but I will try later tonight. Three separate files or does a text block here work?
The case I have in mind is https://clojurescript.org/guides/ns-forms#_implicit_sugar but I will also make a repro later
Is there a way to force clj-kondo in vscode to resolve macros from a dep that it just doesn't want to load?
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
Also see https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#unrecognized-macros
Oh stupid, I have the wrong root folder opened.
But yes, that's unrecognized macros function is neat. Thanks for that nugget.
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.