Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trade one refinement bug for another.
Summary: This diff attempts to fix a bug where temporary refinements could shadow nontemporary refinements so that a temporary refinement of a sub-attribute could invalidate a temporary refinement of an attribute. Unfortunately the fix - to prefer temporary refinements over non-temporary ones - causes another bug (see the regression indicated in unit tests) where on assignment to a mutable attribute we fail to wipe refinement of a final sub-attribute. I would argue that this new bug is not actually new - it's a pre-existing issue because the final sub-attribute is not in fact a nontemporary refinement: any attribute nested *under* a mutable attribute is temporary. These refinements ought to be wiped not only on assignment but on any function call. ------------ Unfortunately, fixing the new bug would probably be a major time investment (I'd guess a half a day to figure out if there's a hard but small fix... all fixes to this code are hard because it's very confusing and the data structures don't model the problem very well... and a week or so if no easy fix exists because we might have to rewrite most of the refinement data structure). I do not believe it is worth the time investment right now to try to get a full fix given that we are working on a re-architecture and it's unlikely anything we learn from fiddling with the existing data structures would map well to the key/binding architecture we are planning to use in the future. I propose we either accept the bug this diff fixes, or accept this diff with the understanding that it makes a different bug more visible. I slightly favor accepting this code since the failure to mark sub-attributes as temporary is a pre-existing problem that just became a little more visible, as opposed to a wholly new regression. Reviewed By: yangdanny97 Differential Revision: D64289922 fbshipit-source-id: ef09b38bc1f0d1f47894ed6d61eabd5731310686
- Loading branch information