restaumatic / purescript-specular

A Reflex-Dom inspired UI library for PureScript
MIT License
131 stars 10 forks source link

Frame effects can execute new frames #10

Closed zyla closed 4 years ago

zyla commented 6 years ago

Quoting from a comment from the test suite:

      -- Fixing this would require some more thought - the problem is that
      -- frame effects can execute new frames, and this can cause
      -- effects of a later frame to be executed before the effects of the
      -- previous frame are done!

This is a problem for asyncRequest, but can manifest itself in other ways. Need to come up with a minimal test case that reproduces this, and think about how to fix it.

zyla commented 4 years ago

Now that I know more about it, I don't think it's actually a bug. The problem is not that new frames can be executed inside handlers, but rather what we do about it. The current synchronous treatment of frames is problematic at times, but at least we sorted out #43 , which was a result of this. So I consider this not a problem.