-
Notifications
You must be signed in to change notification settings - Fork 47.2k
Comparing changes
Open a pull request
base repository: facebook/react
base: 3edc000d7717027a1ce23611070a56358040a554
head repository: facebook/react
compare: d8c90fa48d3addefe4b805ec56a3c65e4ee39127
- 15 commits
- 81 files changed
- 5 contributors
Commits on Sep 27, 2024
-
[playground] Decouple playground from compiler
Currently the playground is setup as a linked workspace for the compiler which complicates our yarn workspace setup and means that snap can sometimes pull in a different version of react than was otherwise specified. There's no real reason to have these workspaces combined so let's split them up. ghstack-source-id: 56ab064b2fc45366f5d96d37c5d4c5dc26590234 Pull Request resolved: #31081
2Configuration menu - View commit details
-
Copy full SHA for db24098 - Browse repository at this point
Copy the full SHA db24098View commit details
Commits on Sep 30, 2024
-
fix[scripts/devtools/publish-release]: parse version list instead of …
…handling 404 (#31087) Discovered yesterday while was publishing a new release. NPM `10.x.x` changed the text for 404 errors, so this check was failing. Instead of handling 404 as a signal, I think its better to just parse the whole list of versions and check if the new one is already there.
Configuration menu - View commit details
-
Copy full SHA for 2d16326 - Browse repository at this point
Copy the full SHA 2d16326View commit details -
[compiler][test fixtures] Fork more fixtures for hir-rewrite
Followup from #30894 , not sure how these got missed. Note that this PR just copies the fixtures without adding `@enablePropagateDepsInHIR`. #31032 follows and actually enables the HIR-version of propagateScopeDeps to run. I split this out into two PRs to make snapshot differences easier to review, but also happy to merge Fixtures found from locally setting snap test runner to default to `enablePropagateDepsInHIR: 'enabled_baseline'` and forking fixtures files with different output. ghstack-source-id: 7d7cf41aa923d83ad49f89079171b0411923ce6b Pull Request resolved: #31030
Configuration menu - View commit details
-
Copy full SHA for 943e45e - Browse repository at this point
Copy the full SHA 943e45eView commit details -
[compiler][test fixtures] Add enablePropagateDepsInHIR to forked tests
Configuration menu - View commit details
-
Copy full SHA for 1a77920 - Browse repository at this point
Copy the full SHA 1a77920View commit details -
[compiler][hir-rewrite] Infer non-null props, destructure source
Followup from #30894. This adds a new flagged mode `enablePropagateScopeDepsInHIR: "enabled_with_optimizations"`, under which we infer more hoistable loads: - it's always safe to evaluate loads from `props` (i.e. first parameter of a `component`) - destructuring sources are safe to evaluate loads from (e.g. given `{x} = obj`, we infer that it's safe to evaluate obj.y) - computed load sources are safe to evaluate loads from (e.g. given `arr[0]`, we can infer that it's safe to evaluate arr.length) ghstack-source-id: 32f3bb72e9f85922825579bd785d636f4ccf724d Pull Request resolved: #31033
Configuration menu - View commit details
-
Copy full SHA for 8c89fa7 - Browse repository at this point
Copy the full SHA 8c89fa7View commit details -
[compiler][hir-rewrite] Cleanup Identifier -> IdentifierId
Since removing ExitSSA, Identifier and IdentifierId should mean the same thing ghstack-source-id: 076cacbe8360e716b0555088043502823f9ee72e Pull Request resolved: #31034
Configuration menu - View commit details
-
Copy full SHA for 58a3ca3 - Browse repository at this point
Copy the full SHA 58a3ca3View commit details -
[compiler] repro for dep merging edge case (non-hir)
Found when writing #31037, summary copied from comments: This is an extreme edge case and not code we'd expect any reasonable developer to write. In most cases e.g. `(a?.b != null ? a.b : DEFAULT)`, we do want to take a dependency on `a?.b`. I found this trying to come up with edge cases that break the current dependency + CFG merging logic. I think it makes sense to error on the side of correctness. After all, we still take `a` as a dependency if users write `a != null ? a.b : DEFAULT`, and the same fix (understanding the `<hoistable> != null` test expression) works for both. Can be convinced otherwise though! ghstack-source-id: cc06afda59f7681e228495f5e35a596c20f875f5 Pull Request resolved: #31035
Configuration menu - View commit details
-
Copy full SHA for 5d12e9e - Browse repository at this point
Copy the full SHA 5d12e9eView commit details -
[compiler][fixtures] Patch error-handling edge case in snap evaluator
Fix edge case in which we incorrectly returned a cached exception instead of trying to rerender with new props. ghstack-source-id: 843fb85df4a2ae7a88f296104fb16b5f9a34c76e Pull Request resolved: #31082
Configuration menu - View commit details
-
Copy full SHA for 2cbea24 - Browse repository at this point
Copy the full SHA 2cbea24View commit details -
[compiler] Renames and no-op refactor for next PR
Rename for clarity: - `CollectHoistablePropertyLoads:Tree` -> `CollectHoistablePropertyLoads:PropertyPathRegistry` - `getPropertyLoadNode` -> `getOrCreateProperty` - `getOrCreateRoot` -> `getOrCreateIdentifier` - `PropertyLoadNode` -> `PropertyPathNode` Refactor to CFG joining logic for `CollectHoistablePropertyLoads`. We now write to the same set of inferredNonNullObjects when traversing from entry and exit blocks. This is more correct, as non-nulls inferred from a forward traversal should be included when computing the backward traversal (and vice versa). This fix is needed by an edge case in #31036 Added invariant into fixed-point iteration to terminate (instead of infinite looping). ghstack-source-id: 1e8eb2d566b649ede93de9a9c13dad09b96416a5 Pull Request resolved: #31036
Configuration menu - View commit details
-
Copy full SHA for c67e241 - Browse repository at this point
Copy the full SHA c67e241View commit details -
[Flight] Serialize Error Values (#31104)
The idea is that the RSC protocol is a superset of Structured Clone. #25687 One exception that we left out was serializing Error objects as values. We serialize "throws" or "rejections" as Error (regardless of their type) but not Error values. This fixes that by serializing `Error` objects. We don't include digest in this case since we don't call `onError` and it's not really expected that you'd log it on the server with some way to look it up. In general this is not super useful outside throws. Especially since we hide their values in prod. However, there is one case where it is quite useful. When you replay console logs in DEV you might often log an Error object within the scope of a Server Component. E.g. the default RSC error handling just console.error and error object. Before this would just be an empty object due to our lax console log serialization: <img width="1355" alt="Screenshot 2024-09-30 at 2 24 03 PM" src="https://github.com/user-attachments/assets/694b3fd3-f95f-4863-9321-bcea3f5c5db4"> After: <img width="1348" alt="Screenshot 2024-09-30 at 2 36 48 PM" src="https://github.com/user-attachments/assets/834b129d-220d-43a2-a2f4-2eb06921747d"> TODO for a follow up: Flight Reply direction. This direction doesn't actually serialize thrown errors because they always reject the serialization.
Configuration menu - View commit details
-
Copy full SHA for 326832a - Browse repository at this point
Copy the full SHA 326832aView commit details
Commits on Oct 1, 2024
-
[Flight] Serialize Server Components Props in DEV (#31105)
This allows us to show props in React DevTools when inspecting a Server Component. I currently drastically limit the object depth that's serialized since this is very implicit and you can have heavy objects on the server. We previously was using the general outlineModel to outline ReactComponentInfo but we weren't consistently using it everywhere which could cause some bugs with the parsing when it got deduped on the client. It also lead to the weird feature detect of `isReactComponent`. It also meant that this serialization was using the plain serialization instead of `renderConsoleValue` which means we couldn't safely serialize arbitrary debug info that isn't serializable there. So the main change here is to call `outlineComponentInfo` and have that always write every "Server Component" instance as outlined and in a way that lets its props be serialized using `renderConsoleValue`. <img width="1150" alt="Screenshot 2024-10-01 at 1 25 05 AM" src="https://github.com/user-attachments/assets/f6e7811d-51a3-46b9-bbe0-1b8276849ed4">
Configuration menu - View commit details
-
Copy full SHA for 654e387 - Browse repository at this point
Copy the full SHA 654e387View commit details -
fix[react-devtools]: request hook initialization inside http server r…
…esponse (#31102) Fixes #31100. There are 2 things: 1. In #30987, we've introduced a breaking change: importing `react-devtools-core` is no longer enough for installing React DevTools global Hook. You need to call `initialize`, in which you may provide initial settings. I am not adding settings here, because it is not implemented, and there are no plans for supporting this. 2. Calling `installHook` is not necessary inside `standalone.js`, because this script is running inside Electron wrapper (which is just a UI, not the app that we are debugging). We will loose the ability to use React DevTools on this React application, but I guess thats fine.
Configuration menu - View commit details
-
Copy full SHA for 40357fe - Browse repository at this point
Copy the full SHA 40357feView commit details -
chore[react-devtools]: add legacy mode error message to the ignore li…
…st for tests (#31060) Without this, the console gets spammy whenever we run React DevTools tests against React 18.x, where this deprecation message was added.
Configuration menu - View commit details
-
Copy full SHA for 9ea5ffa - Browse repository at this point
Copy the full SHA 9ea5ffaView commit details -
chore[react-devtools]: drop legacy context tests (#31059)
We've dropped the support for detecting changes in legacy Contexts in #30896.
Configuration menu - View commit details
-
Copy full SHA for 6e61258 - Browse repository at this point
Copy the full SHA 6e61258View commit details -
Disable infinite render loop detection (#31088)
We're seeing issues with this feature internally including bugs with sibling prerendering and errors that are difficult for developers to action on. We'll turn off the feature for the time being until we can improve the stability and ergonomics. This PR does two things: - Turn off `enableInfiniteLoopDetection` everywhere while leaving it as a variant on www so we can do further experimentation. - Revert #31061 which was a temporary change for debugging. This brings the feature back to baseline.
Configuration menu - View commit details
-
Copy full SHA for d8c90fa - Browse repository at this point
Copy the full SHA d8c90faView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 3edc000d7717027a1ce23611070a56358040a554...d8c90fa48d3addefe4b805ec56a3c65e4ee39127