Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] Updates "un-committed" when rebasing #17430

Closed
wants to merge 3 commits into from

Commits on Nov 21, 2019

  1. Failing test: Updates "un-committed" when rebasing

    Adds a failing test case where an update that was committed is
    later skipped over during a rebase. This should never happen.
    acdlite committed Nov 21, 2019
    Configuration menu
    Copy the full SHA
    ac040cc View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2019

  1. Mark range of updates that need to be rebased

    To enforce that updates that are committed can never be un-committed,
    even during a rebase, we need to track which updates are part of the
    rebase. The current implementation doesn't do this properly. It has a
    hidden assumption that, when rebasing, the next `renderExpirationTime`
    will represent a later expiration time that the original one. That's
    usually true, but it's not *always* true: there could be another update
    at even higher priority.
    
    This requires two extra fields on the update queue. I really don't like
    that the update queue logic has gotten even more complicated. It's
    tempting to say that we should remove rebasing entirely, and that update
    queues must always be updated at the same priority. But I'm hesitant to
    jump to that conclusion — rebasing can be confusing in the edge cases,
    but it's also convenient. Enforcing single-priority queues would really
    hurt the ergonomics of useReducer, for example, where multiple values
    are centralized in a single queue. It especially hurts the ergonomics
    of classes, where there's only a single queue per class.
    
    So it's something to think about, but I don't think "no more rebasing"
    is an acceptable answer on its own.
    acdlite committed Nov 22, 2019
    Configuration menu
    Copy the full SHA
    4ae46ee View commit details
    Browse the repository at this point in the history
  2. Put the fix behind a flag

    acdlite committed Nov 22, 2019
    Configuration menu
    Copy the full SHA
    97ec757 View commit details
    Browse the repository at this point in the history