This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-14
Channels
- # aleph (3)
- # announcements (16)
- # aws (6)
- # babashka (10)
- # beginners (28)
- # cider (1)
- # clj-kondo (14)
- # cljdoc (2)
- # cljs-dev (27)
- # cljsrn (7)
- # clojure (78)
- # clojure-europe (2)
- # clojurescript (14)
- # conjure (6)
- # core-async (2)
- # fulcro (5)
- # helix (7)
- # jobs (1)
- # lgbtq (1)
- # malli (12)
- # missionary (1)
- # nbb (10)
- # pathom (1)
- # portal (12)
- # protojure (1)
- # re-frame (41)
- # react (2)
- # reitit (1)
- # reveal (1)
- # shadow-cljs (72)
- # sql (11)
- # tools-deps (8)
- # vim (1)
- # xtdb (4)
I’m just starting to get into clj-kondo and really like it so far!
Is it possible that clj-kondo can resolve function names that a macro produces? For example, I have a macro create-utils
that generates a set of standard functions like save!
and for-id
.
I tried using the macroexpand
utility and I couldn’t get that to work, but I’m not sure if this behavior is possible to resolve with clj-kondo. Could I reference save!
or for-id
from another namespace and have it resolve successfully?
Example:
(ns db.core
(:require [db.util :as util])
(util/create-utils)
(ns db.test
(:require [db.core :as core])
(defn get-data []
(core/for-id 1))
I accidentally hit the wrong enter button!!
In the example above, I am having trouble resolving for-id
in db.test
what you can do here is use the macroexpand
feature to expand into (do (def for-id ..) )
That’s the confirmation I needed before I spent a ton of time on it. I really appreciate your support in this channel; it’s downright impressive