clj-commons / potemkin

some ideas which are almost good
572 stars 53 forks source link

Basic clj-kondo support, minor doc updates, some deprecations #66

Closed KingMob closed 1 year ago

KingMob commented 1 year ago

The kondo support is not too sophisticated, since there are very few users of anything in potemkin besides import-vars. It mainly aims to cut down on the most egregious warnings in Aleph. Anyone who only uses import-vars should see no differences.

A few fns have also been deprecated. In particular, the fast-* variants and their support fns. From testing, I know fast-memoize is, in fact, slower than modern Clojure's memoize. Also, try* has been deprecated. There's no tests for it, no rationale in the commit log, and I can find no real-world uses anywhere.

There's some minor README and docstring updates.

KingMob commented 1 year ago

@borkdude I hope you don't mind me adding you as a reviewer. Would you be able take a look at the kondo additions?

The threshold for usefulness here is pretty low. I'm not trying to lint these perfectly.

KingMob commented 1 year ago

Would it be worth documenting why the deprecated vars are documented? In a doc string or otherwise?

@slipset Well, I did that for fast-memoize's docstring. AFAICT, nobody anywhere (including Zach himself) used try*, so I don't think anyone will notice.

I can add a line or two for fast-bound-fn, tho.

borkdude commented 1 year ago

LGTM!