fun-map icon indicating copy to clipboard operation
fun-map copied to clipboard

Cycle detection

Open WhittlesJr opened this issue 3 years ago • 3 comments

One of the stickiest issues I deal with when debugging problems with fun-map is that it will silently perform infinite loops if you have a dependency cycle in your fws. It would really help improve the robustness of the library if it could detect an infinite cycle and point out which keys are to blame.

WhittlesJr avatar Dec 23 '21 13:12 WhittlesJr

Good point, it can be done by tracking the invocation order in runtime, like using a trace-fn, however, I am not very sure if we should leave it to users.

robertluo avatar Dec 24 '21 03:12 robertluo

weavejester's dependency library has cycle detection. I wonder if fun-map could use it directly, or if that's too much refactoring, at least use it as inspiration for its own implementation.

WhittlesJr avatar Dec 27 '21 15:12 WhittlesJr

Great suggestion.

robertluo avatar Dec 29 '21 03:12 robertluo