Fork me on GitHub
#clj-kondo
<
2020-09-21
>
sogaiu05:09:16

@borkdude thanks -- it's slightly different in form i think, but i adapted @lee's example to end up with this: https://gist.github.com/sogaiu/ad05cde3fd2529c11949903ca5993301 i transplanted the metadata so more info is available in the analysis: https://gist.github.com/sogaiu/ad05cde3fd2529c11949903ca5993301#file-utils-clj-L67-L72 @lee don't know if it's worth it for import-vars-with-mods, but it seems something similar could be done there.

sogaiu05:09:21

a downside of export-symbols and import-vars is that the indexed info points you at a location that doesn't make it convenient to get to the ultimate definition you'd likely be interested in seeing. contrast this with what core.async does: https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async.clj#L56-L60 a tool might send you to those defns from usages but it's only one more step to use the tool again to get to the defintion that's being wrapped.

borkdude10:09:25

@sogaiu I tend to go with the core.async approach and avoid tools like import-vars. I do support it in clj-kondo since it's pretty well established in the community

👍 3
lread12:09:42

Thanks @sogaiu, I will take a look. The import-vars approach most certainly has its pros and cons. Continueing with it in rewrite-cljc has taught me tons, which has been fun for me, but the amount of time I have spent on it has been, uh, lots.

😆 3