This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-30
Channels
- # babashka (7)
- # beginners (25)
- # calva (22)
- # cljs-dev (1)
- # clojure (62)
- # clojure-europe (118)
- # clojure-hamburg (4)
- # clojure-israel (2)
- # clojure-nl (2)
- # clojure-uk (6)
- # clojured (1)
- # clojurescript (23)
- # conjure (11)
- # cursive (3)
- # datomic (14)
- # duct (2)
- # emacs (12)
- # figwheel-main (1)
- # gratitude (1)
- # hyperfiddle (4)
- # joyride (72)
- # lsp (46)
- # luminus (1)
- # malli (1)
- # off-topic (54)
- # pathom (19)
- # polylith (11)
- # releases (2)
- # sci (22)
- # shadow-cljs (4)
- # vim (11)
- # xtdb (52)
today I noticed that there is something wrong with my config and macros that used to be resolved as defn-catch-all
now throw errors
Looks correct Is it possible to share the project? Or create a tiny sample which I can test it myself
I can try it soon One thing I suggest is to use the clj-kondo export feature which you can include in your lib itself and all clients of that would make your config work OOTB. A example of that here: http://github.com/nubank/state-flow
@U0BBFDED7 after testing the project, I repro the same issue and it was only fixed after I moved the macro definition outside the :clj reader conditional, so I think it may be expected by clj-kondo or a bug there
is it a bug or should it be like that? I can create an issue on GH if needed @U04V15CAJ
minimal code
#?(:clj
(defmacro defeffect
[:id & args]
nil))
(defeffect :foo
[bar baz]
(+ bar baz))
it's no big deal and if you say it's the way it's supposed to be, I'll learn to live with it 🙃
Yes, this might be a bug with def-catch-all
. This does work:
(ribelo.praxis/defeffect :foo
[bar baz]
(+ bar baz))
But I think there's a better way to do this than def-catch-all
since that is intended to see the name of the var you are defining and that is not working with keywordsSo it means to properly lint it will require a custom hook code and not only lint-as right?
@U0BBFDED7 so it's not a bug
@U0BBFDED7 this should work better:
https://github.com/ribelo/praxis/pull/1
But it requires the newest lsp which supports the .clj_kondo
extension
@UKFSJSM38 plz check DM
@U0BBFDED7 ok, with the upgraded clojure-lsp your macros should now work better