is there a tool to get a visual graph of the signal graph? like graphviz dot
afaict from the documentation that works for fx dispatching, but not drawing subscription dependency trees
Looks like re-frame-flow overrides the value of some re-frame.core fns, like reg-event-fx, so that they close over re-frame-flow's state. Then it draws a graph from that state, using https://www.npmjs.com/package/@dagrejs/dagre and https://www.npmjs.com/package/react-flow-renderer. Looks nice, works pretty cleanly.
You could probably change it so that it overrides re-frame.core/subscribe in a similar way, somehow.
I've been thinking about building a graph viewer for https://day8.github.io/re-frame/Flows/. I wonder if react-flow-renderer is a good tool to use here, or if I should consider something more clojure-native. Maybe use https://github.com/scicloj/clay, or extend https://github.com/clojure/core.async.flow-monitor.
Even more tools... https://github.com/simongray/clojure-graph-resources
I have done this for core.async flow. It implements datafy so it was easy to load into loom and then graphviz is free. If you add datafy to reframe flow, then it would unlock this and all the loom goodies
I would use a tool like this if it existed
yeah, I didn't see re-frisk having this exact functionality
I can of course follow the keys to definitions in emacs , but a visual graph would be nice
to see that if I change this, then this whole subtree potentially recomputes
I actually (tried) to write a static analyzer for re-frame subs many many years ago, back when I was learning re-frame. It produced dot, but had many caveats as it's just a static analysis of the source code so it was easy to confuse. I hesitate to provide a link as I'm not very proud of the code 🙂 These days you could probably leverage clj-kondo analysis for something like that. I know that re-frisk can visualize the sub graph, but not sure if you can export it
runtime is fine
I'll check re-frisk