moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

Order of functions in flow::flow_view_deps #124

Closed OskarGauffin closed 1 year ago

OskarGauffin commented 1 year ago

Hi,

Thanks for a nice package. I'm a bit surprised that my flowchart doesn't follow the execution order of the nested functions.

Here's my graph, and the numbers show the execution order.

flow::flow_view_deps(workhorse, lines=TRUE, include_formals=TRUE, show_imports="none")

image

moodymudskipper commented 1 year ago

Thanks for the kind words.

Unfortunately I cannot do much about this, I depend on {nomnoml} which itself depends on the nomnoml js library and it has its own hardcoded algorithm on how to arrange these items.

Note that your functions might be called several times so there is no real order, just dependencies. Nevertheless I would also prefer to be able to show them in order of their first appearances, maybe with another diagramming library this could work.

I'm closing this but I will remember this when I'll be working on #127 (that I just open for this). I'm afraid it won't be high on the priority list however.