This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-01
Channels
- # aws (37)
- # babashka (7)
- # babashka-sci-dev (2)
- # beginners (75)
- # biff (7)
- # calva (85)
- # cider (9)
- # clj-kondo (26)
- # clj-yaml (1)
- # clojure (45)
- # clojure-europe (4)
- # clojure-norway (1)
- # clojure-spec (3)
- # clojure-uk (2)
- # clojurescript (3)
- # core-typed (2)
- # cursive (12)
- # fulcro (3)
- # humbleui (5)
- # jobs (8)
- # malli (1)
- # meander (3)
- # membrane (1)
- # portal (50)
- # squint (15)
- # vim (1)
Maybe a silly question, but is :lint-as
meant to be transitive?
E.g., if I have in the lint-as
map:
{outside.lib/foo clojure.core/def
outside.lib/bar outside.lib/foo}
and I use outside.lib/bar
, shouldn’t clj-kondo be able to ultimately resolve outside.lib/bar
as clojure.core/def
?What about if a hook existed instead for outside.lib/foo
?
:thinking_face:
It’s not a lot of work to fix, I was just surprised that wasn’t already how kondo worked
Is there a config scenario where .clj-kondo/config.edn
is ignored, or the config-paths
entry inside it is?
I’ve been tearing my hair out trying to figure out why my changes to resources/clj-kondo.exports/potemkin/potemkin/config.edn
weren’t getting picked up. In desperation, I copied the same config lines to .clj-kondo/config.edn
, and lo and behold, it worked. I had what I thought was a valid config paths entry: :config-paths ["../resources/clj-kondo.exports/potemkin/potemkin/"]
, but it didn’t seem to have any effect.
I also had an older config.edn in .clj-kondo/potemkin/potemkin/config.edn
(iirc), and deleting it seemed to fix the situation, but I haven’t found anything in the docs to explain what was going on.
I tried with and without the slash earlier, and it didn’t seem to make a difference, but I’ll double-check
Thanks for all your help, btw
I tried again, and found no difference. FWIW, it seems to be working now, once I removed .clj-kondo/potemkin/potemkin/config.edn
Now I’m trying to figure out why kondo is finding potemkin.namespaces/ in the top-level potemkin, but *not anything else…when it seems like it shouldn’t find anything…not that that’s helpful for potemkin consumers, but I’m a bit confused
…really doubting whether linting many of the potemkin types is worth it.
Clj-kondo has built-in support for the most frequently used thing in Potemkin: import-vars
Yeah. I was most interested in supporting Aleph’s usage, but it looks like handling stuff like def-abstract-type and def-map-type will be seriously nontrivial. If Potemkin had more use, I might slog thru, but it’s getting really hard to justify the more esoteric uses.
How does def-catch-all compare to deftype, which several of these bottom out at?
Got it. Still, that might be preferable for things like def-map-type, which keeps causing “Invalid arity” warnings, because it thinks the assoc
definition is a call to clojure.core/assoc
…let me try that out…
Michiel, thanks for all your help. I think I’ll try to cut a release for some very basic kondo support for potemkin, and then set it aside