fun-map
fun-map copied to clipboard
Cycle detection
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 fw
s. 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.
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.
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.
Great suggestion.