This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-21
Channels
- # announcements (3)
- # architecture (5)
- # babashka (19)
- # beginners (145)
- # calva (1)
- # chlorine-clover (18)
- # cider (10)
- # clj-kondo (5)
- # cljsrn (3)
- # clojure (56)
- # clojure-berlin (19)
- # clojure-czech (2)
- # clojure-europe (32)
- # clojure-finland (2)
- # clojure-nl (3)
- # clojure-portugal (2)
- # clojure-spec (8)
- # clojure-uk (48)
- # clojurescript (48)
- # conjure (50)
- # cryogen (1)
- # cursive (28)
- # datomic (54)
- # depstar (12)
- # emacs (1)
- # events (8)
- # figwheel-main (6)
- # fulcro (4)
- # helix (4)
- # java (2)
- # jobs (2)
- # leiningen (1)
- # off-topic (29)
- # parinfer (4)
- # pathom (6)
- # portkey (3)
- # reagent (1)
- # remote-jobs (3)
- # reveal (16)
- # shadow-cljs (42)
- # sql (20)
- # tools-deps (11)
- # vim (4)
- # vrac (2)
@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.
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.
@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
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.
@borkdude, I do like sci’s copy-var, which is different but reminds me of import-var. https://github.com/borkdude/sci/blob/187c4551227c938090910b8ab3da024ca674c2ac/src/sci/core.cljc#L47