moodymudskipper / flow

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

handle cases where the end of the function is never reached. #11

Closed moodymudskipper closed 4 years ago

moodymudskipper commented 4 years ago

This would concern functions that use return statements everywhere, such as data.table:::foverlaps, or functions that are meant to stop in any case.

library(funflow)
test <- function(x) {if(foo) stop() else return(NULL)}
view_flow(test)

Created on 2019-10-21 by the reprex package (v0.3.0)

It is a consequence of https://github.com/moodymudskipper/funflow/commit/542fb3ebc43b9590d576b90e6de39bf5ceb8a11c

but previously it was really just "working" by luck.

moodymudskipper commented 4 years ago

these cases also explain why we somtimes get one of more "end" symbols hanging on top of some blocks, they can be ignored as they are the remnants of links that are cut by stop and return calls.

moodymudskipper commented 4 years ago

seem to be solved by https://github.com/moodymudskipper/funflow/commit/313e62a8d76c7f557a0249089a3f6824d19dc93c

github-actions[bot] commented 2 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.