Closed zetanumbers closed 3 years ago
I've reproduced this and I see the problem -- the DepNode for the once() call is unconditionally inheriting the liveness from the cache() node upon which its depended, but this is obviously incorrect in cases where the cache() call executes the closure on the same revision that once()'s DepNode hasn't been called.
I think the solution is to store when a node was last actively traversed, and to not inherit liveness until it's been "dormant" for at least one revision.
Code to reproduce varying behavior (uncomment lines):
This code produces:
However if you uncomment every line of code, i.e. wrap root's body with moxie::cache, which would be recached on every run bc of argument counter i, you'll get: