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

[Fiber] Fix some of the warnings #8570

Merged
merged 14 commits into from
Dec 15, 2016
Merged

Commits on Dec 14, 2016

  1. Configuration menu
    Copy the full SHA
    7bc8f36 View commit details
    Browse the repository at this point in the history
  2. Keep Fiber debug source up to date

    When an element changes, we should copy the source and owner again.
    Otherwise they can get stale since we're not reading them from the element.
    gaearon committed Dec 14, 2016
    Configuration menu
    Copy the full SHA
    c456f7d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    18808a1 View commit details
    Browse the repository at this point in the history
  4. Explicitly specify Fiber types to include in the stack

    Fixes an accidental omission when both source and owner are null but displayName exists.
    gaearon committed Dec 14, 2016
    Configuration menu
    Copy the full SHA
    d501676 View commit details
    Browse the repository at this point in the history
  5. Fix mised Stack+Fiber test to not expect extra warnings

    When we're in Fiber mode we don't actually expect that warning being printed.
    gaearon committed Dec 14, 2016
    Configuration menu
    Copy the full SHA
    ddae7db View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aa92f74 View commit details
    Browse the repository at this point in the history
  7. Implement duplicate key warnings

    We keep known keys in a set in development. There is an annoying special case where we know we'll check it again because we break out of the loop early.
    
    One test in the tree hook regresses to the failing state because it checks that the tree hook works without a Set available, but we started using Set in this code. It is not essential and we can clean this up later when we decide how to deal with polyfills.
    gaearon committed Dec 14, 2016
    Configuration menu
    Copy the full SHA
    dbb62a9 View commit details
    Browse the repository at this point in the history
  8. Move ReactTypeOfWork to src/shared

    It needs to be available both to Fiber and Isomorphic because the tree hook lives in Isomorphic but pretty-prints Fiber stack.
    gaearon committed Dec 14, 2016
    Configuration menu
    Copy the full SHA
    8f544a7 View commit details
    Browse the repository at this point in the history
  9. Add dev-only ReactDebugCurrentFiber for warnings

    The goal is to use ReactCurrentOwner less and rely on ReactDebugCurrentFiber for warning owner name and stack.
    gaearon committed Dec 14, 2016
    Configuration menu
    Copy the full SHA
    6796336 View commit details
    Browse the repository at this point in the history
  10. Make Stack invariant messages more consistent

    Fiber used a helper so two tests had the same phrasing.
    Stack also used a helper for most invariants but hardcoded a different phrase in one place.
    I changed that invariant message to use a helper which made it consistent with what it prints in Fiber.
    gaearon committed Dec 14, 2016
    Configuration menu
    Copy the full SHA
    655a763 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2016

  1. Make CSSPropertyOperations use getCurrentFiberOwnerName()

    This gets mount-time CSS warnings to be printed.
    
    However update-time warnings are currently ignored because current fiber is not yet available during the commit phase.
    
    We also regress on HostOperation hook tests but this doesn't matter because it's only used by ReactPerf and it doesn't work with Fiber yet anyway. We'll have to think more about it later.
    gaearon committed Dec 15, 2016
    Configuration menu
    Copy the full SHA
    7566a14 View commit details
    Browse the repository at this point in the history
  2. Set ReactDebugCurrentFiber during the commit phase

    This makes it available during updates, fixing the last failing test in CSSPropertyOperations.
    gaearon committed Dec 15, 2016
    Configuration menu
    Copy the full SHA
    080330a View commit details
    Browse the repository at this point in the history
  3. Add DOM warnings by calling hooks directly

    It is not clear if the old hook system is worth it in its generic incarnation. For now I am just hooking it up to the DOMFiber renderer directly.
    gaearon committed Dec 15, 2016
    Configuration menu
    Copy the full SHA
    bc6bd20 View commit details
    Browse the repository at this point in the history
  4. Add client-side counterparts for some warning tests

    This helps us track which warnings are really failing in Fiber, and which ones depend on SSR.
    gaearon committed Dec 15, 2016
    Configuration menu
    Copy the full SHA
    837e683 View commit details
    Browse the repository at this point in the history