Fork me on GitHub
#clj-kondo
<
2019-10-07
>
yuhan12:10:00

Can I use clj-kondo's analysis info to obtain a dependency graph on the function level?

yuhan12:10:28

i.e. which functions reference / call which other functions

borkdude12:10:32

not yet. could be an interesting feature to add. if you can make a github issue for this with a compelling use case, that would be nice

borkdude12:10:23

I don't have any linters that use this information so I don't know how easy it will be to implement this

borkdude12:10:14

but right now it's not there

yuhan12:10:59

it's more of a curiosity at the moment, I often find myself tracing the execution of a function stack through many different parts of the file and across namespaces

yuhan12:10:12

It's easy to lose track of context doing that, and thought it would be nice to output a big Graphviz file where those dependencies could be seen visually

borkdude12:10:43

I imagine the following: each var-definition lists a :depends list which has the vars it call. that's maybe not so hard to add and with this information you can build up this graph

yuhan12:10:34

yes, that should be all I need :)

borkdude12:10:50

btw @qythium, thanks for posting the other two bugs recently. those were fixed on master. I put the links to the new binaries in the issues.

yuhan12:10:21

yes I saw them but couldn't figure out how to get the linked binary recognized by flycheck, I trust they should be working and released soon though

yuhan12:10:54

thanks for the quick turnaround!

borkdude12:10:09

yeah, I think end of this week maybe