-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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] Extract Functions that Call User Space and Host Configs in Commit to Separate Modules #30881
Conversation
This should really be covered by the inner functions.
The effective change is only that errors in unmount insertion effects don't abort mount insertion effects. We probably should abort future phases when earlier phases abort we don't currently.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
commitDeletionEffects(root, parentFiber, childToDelete); | ||
} catch (error) { | ||
captureCommitPhaseError(childToDelete, parentFiber, error); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This catch was removed since it should be handled by the individual calls deeper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all host config methods are wrapped because that would be a lot of them so doesn't seem worth it. E.g. the Float ones could error and take other things along with it.
HookInsertion | HookHasEffect, | ||
finishedWork, | ||
); | ||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This used to be one catch but is now two. So if the unmount throws, we continue with the mount.
That's probably not desirable but consistent with other effects we have atm.
Comparing: f820f5a...78b9c48 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show |
08b8d14
to
d26ec92
Compare
d26ec92
to
7275edb
Compare
The release is still not wrapped.
ba1e919
to
9c64bc7
Compare
Stacked on #30881. Move `runWithFiberInDEV` from the recursive part of the commit phase and instead wrap each call into user space. These should really map 1:1 with where we're using `try/catch` since that's where we're calling into user space. The goal of this is to avoid the extra stack frames added by `enableOwnerStacks` in the recursive parts to avoid stack overflow. This way we only have a couple of extra at the end of the stack instead of a couple of extra at every depth of the tree.
…mmit to Separate Modules (#30881) This is mostly just moves and same code extracted into utility functions. This is to help clarify what needs to be wrapped in try/catch and runWithFiberInDEV. I'll do the runWithFiberInDEV changes in a follow up. This leaves ReactCommitWork mostly to do matching on the tag and the recursive loops. DiffTrain build for commit fe03c56.
…mmit to Separate Modules (#30881) This is mostly just moves and same code extracted into utility functions. This is to help clarify what needs to be wrapped in try/catch and runWithFiberInDEV. I'll do the runWithFiberInDEV changes in a follow up. This leaves ReactCommitWork mostly to do matching on the tag and the recursive loops. DiffTrain build for [fe03c56](fe03c56)
Stacked on #30881. Move `runWithFiberInDEV` from the recursive part of the commit phase and instead wrap each call into user space. These should really map 1:1 with where we're using `try/catch` since that's where we're calling into user space. The goal of this is to avoid the extra stack frames added by `enableOwnerStacks` in the recursive parts to avoid stack overflow. This way we only have a couple of extra at the end of the stack instead of a couple of extra at every depth of the tree. DiffTrain build for commit a03254b.
Stacked on #30881. Move `runWithFiberInDEV` from the recursive part of the commit phase and instead wrap each call into user space. These should really map 1:1 with where we're using `try/catch` since that's where we're calling into user space. The goal of this is to avoid the extra stack frames added by `enableOwnerStacks` in the recursive parts to avoid stack overflow. This way we only have a couple of extra at the end of the stack instead of a couple of extra at every depth of the tree. DiffTrain build for [a03254b](a03254b)
**breaking change for canary users: Bumps peer dependency of React from `19.0.0-rc-7771d3a7-20240827` to `19.0.0-rc-94e652d5-20240912`** [diff facebook/react@7771d3a7...94e652d5](facebook/react@7771d3a...94e652d) <details> <summary>React upstream changes</summary> - facebook/react#30952 - facebook/react#30950 - facebook/react#30946 - facebook/react#30934 - facebook/react#30947 - facebook/react#30945 - facebook/react#30938 - facebook/react#30936 - facebook/react#30879 - facebook/react#30888 - facebook/react#30931 - facebook/react#30930 - facebook/react#30832 - facebook/react#30929 - facebook/react#30926 - facebook/react#30925 - facebook/react#30905 - facebook/react#30900 - facebook/react#30910 - facebook/react#30906 - facebook/react#30899 - facebook/react#30919 - facebook/react#30708 - facebook/react#30907 - facebook/react#30897 - facebook/react#30896 - facebook/react#30895 - facebook/react#30887 - facebook/react#30889 - facebook/react#30893 - facebook/react#30892 - facebook/react#30891 - facebook/react#30882 - facebook/react#30881 - facebook/react#30870 - facebook/react#30849 - facebook/react#30878 - facebook/react#30865 - facebook/react#30869 - facebook/react#30875 - facebook/react#30800 - facebook/react#30762 - facebook/react#30831 - facebook/react#30866 - facebook/react#30853 - facebook/react#30850 - facebook/react#30847 - facebook/react#30842 - facebook/react#30837 - facebook/react#30848 - facebook/react#30844 - facebook/react#30839 - facebook/react#30802 - facebook/react#30841 - facebook/react#30827 - facebook/react#30826 - facebook/react#30825 - facebook/react#30824 - facebook/react#30840 - facebook/react#30838 - facebook/react#30836 - facebook/react#30819 - facebook/react#30816 - facebook/react#30814 - facebook/react#30813 - facebook/react#30812 - facebook/react#30811 </details> --------- Co-authored-by: vercel-release-bot <infra+release@vercel.com>
This is mostly just moves and same code extracted into utility functions.
This is to help clarify what needs to be wrapped in try/catch and runWithFiberInDEV. I'll do the runWithFiberInDEV changes in a follow up.
This leaves ReactCommitWork mostly to do matching on the tag and the recursive loops.