joker

Discuss all things joker, the Clojure interpreter/linter on top of Go. https://github.com/candid82/joker
borkdude 2019-05-27T19:50:02.002100Z

hi. small question that came up at clj-kondo and I wonder how joker thinks about it: if you write 'foo/bar or

`foo/bar
or
(quote foo/bar)
how should that affect linting ununsed namespaces? In Clojure, you do not need to require namespace foo in either case, although joker counts foo as used in the case of the syntax-quote

dominicm 2019-05-27T20:39:03.003500Z

In the case of protocol metadata, there is something you're implementing though. And maybe you are expecting something else to use it.

borkdude 2019-05-27T20:49:45.004100Z

@dominicm were you responding to my question? can you give an example - what do you think the behavior should be?

dominicm 2019-05-27T20:50:56.005300Z

I was, yeah 🙂 Don't have a strong opinion, just weighing in that:

(with-meta obj {`foo/bar (fn [this] …)})
foo/bar is used, but it isn't directly called by my library (necessarily).

dominicm 2019-05-27T20:51:24.005700Z

oh, I guess this is about unused-require vs unused-ns? Is there an unused-ns?

borkdude 2019-05-27T20:56:54.006100Z

unused-require I mean yes

borkdude 2019-05-27T21:10:49.007600Z

maybe syntax-quote is a good to choice to count the namespace as used, e.g. in writing macros, you’ll often want to load the namespaces, even if you’re only generating code that will use those namespaces and you’re not using them at macro definition time

đź‘Ť 1
borkdude 2019-05-27T21:16:19.008100Z

so from that angle, joker’s behavior makes total sense

dominicm 2019-05-27T21:58:30.009Z

The ' makes no sense though, the require has nothing to do with that