Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 518d06d2
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fc8a898d
Choose a head ref
  • 11 commits
  • 79 files changed
  • 5 contributors

Commits on Dec 20, 2024

  1. Turn off enableYieldingBeforePassive in internal test renderers (#31863)

    #31785 turned on
    `enableYieldingBeforePassive` for the internal test renderer builds. We
    have some failing tests on the RN side blocking the sync so lets turn
    these off for now.
    jackpope authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    de82912 View commit details
    Browse the repository at this point in the history
  2. [compiler] Allow type cast expressions with refs (#31871)

    We report a false positive for the combination of a ref-accessing
    function placed inside an array which is they type-cast. Here we teach
    ref validation about type casts. I also tried other variants like
    `return ref as const` but those already worked.
    
    Closes #31864
    josephsavona authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    6a3d6a4 View commit details
    Browse the repository at this point in the history
  3. [assert helpers] not dom or reconciler (#31862)

    converts everything left outside react-dom and react-reconciler
    rickhanlonii authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    26297f5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    99471c0 View commit details
    Browse the repository at this point in the history
  5. [compiler] transform fire calls (#31796)

    This is the diff with the meaningful changes. The approach is:
    1. Collect fire callees and remove fire() calls, create a new binding
    for the useFire result
    2. Update LoadLocals for captured callees to point to the useFire result
    3. Update function context to reference useFire results
    4. Insert useFire calls after getting to the component scope
    
    This approach aims to minimize the amount of new bindings we introduce
    for the function expressions
    to minimize bookkeeping for dependency arrays. We keep all of the
    LoadLocals leading up to function
    calls as they are and insert new instructions to load the originally
    captured function, call useFire,
    and store the result in a new promoted temporary. The lvalues that
    referenced the original callee are
    changed to point to the new useFire result.
    
    This is the minimal diff to implement the expected behavior (up to
    importing the useFire call, next diff)
    and further stacked diffs implement error handling. The rules for fire
    are:
    1. If you use fire for a callee in the effect once you must use it for
    every time you call it in that effect
    2. You can only use fire in a useEffect lambda/functions defined inside
    the useEffect lambda
    
    There is still more work to do here, like updating the effect dependency
    array and handling object methods
    
    --
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31796).
    * #31811
    * #31798
    * #31797
    * __->__ #31796
    jbrown215 authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    03297e0 View commit details
    Browse the repository at this point in the history
  6. [compiler] add fire imports (#31797)

    Summary:
    
    Adds import {useFire} from 'react' when fire syntax is used.
    
    This is experimentation and may not become a stable feature in the
    compiler.
    
    --
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31797).
    * #31811
    * #31798
    * __->__ #31797
    jbrown215 authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    ab27231 View commit details
    Browse the repository at this point in the history
  7. [compile] Error on fire outside of effects and ensure correct compila…

    …tion, correct import (#31798)
    
    Traverse the compiled functions to ensure there are no lingering fires
    and that all
    fire calls are inside an effect lambda.
    
    Also corrects the import to import from the compiler runtime instead
    
    
    --
    jbrown215 authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    45a720f View commit details
    Browse the repository at this point in the history
  8. [compiler] Rewrite effect dep arrays that use fire (#31811)

    If an effect uses a dep array, also rewrite the dep array to use the
    fire binding
    
    --
    jbrown215 authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    6907aa2 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2024

  1. [asserts helpers] react package (#31853)

    Based off #31844
    
    Commit to review:
    11aa104
    
    Converts the rest of the `react` package.
    rickhanlonii authored Dec 23, 2024
    Configuration menu
    Copy the full SHA
    94867f3 View commit details
    Browse the repository at this point in the history
  2. [assert helpers] Remove toWarnDev from fixtures/dom (#31894)

    This is unused and never was:
    e6a0473
    rickhanlonii authored Dec 23, 2024
    Configuration menu
    Copy the full SHA
    97d7949 View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2024

  1. [compiler] Fix broken fire snapshot (#31920)

    This was not committed in #31811
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31920).
    * #31919
    * #31918
    * #31917
    * #31916
    * #31915
    * __->__ #31920
    poteto authored Dec 26, 2024
    Configuration menu
    Copy the full SHA
    fc8a898 View commit details
    Browse the repository at this point in the history
Loading