Move ReactFiberErrorDialog RN fork into RN itself#16141
Merged
cpojer merged 1 commit intofacebook:masterfrom Jul 16, 2019
motiz88:error-dialog-to-rn
Merged
Move ReactFiberErrorDialog RN fork into RN itself#16141cpojer merged 1 commit intofacebook:masterfrom motiz88:error-dialog-to-rn
cpojer merged 1 commit intofacebook:masterfrom
motiz88:error-dialog-to-rn
Conversation
Details of bundled changes.Comparing: d9b4c55...7af7722 react-native-renderer
Generated by 🚫 dangerJS |
Contributor
|
Sorry if I've misunderstood, but you did mention that this should only be merged only after facebook/react-native#25671 lands, which it hasn't. Intentional? (I ask because I'm planning on cutting a new React alpha very soon) |
Contributor
Author
|
@threepointone What I really meant is that this can't be synced to RN before the RN PR lands (side note: it's landing now). It's not actually a blocker to merging or to cutting a React release. |
Contributor
|
Good to know, thank you! |
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Jul 31, 2019
Summary: # Context In facebook/react#16141 we imported `ReactFiberErrorDialog` unchanged from React. That implementation was not idempotent: if passed the same error instance multiple times, it would amend its `message` property every time, eventually leading to bloat and low-signal logs. The message bloat problem is most evident when rendering multiple `lazy()` components that expose the same Error reference to React (e.g. due to some cache that vends the same rejected Promise multiple times). More broadly, there's a need for structured, machine-readable logging to replace stringly-typed interfaces in both the production and development use cases. # This diff * We leave the user-supplied `message` field intact and instead do all the formatting inside `ExceptionsManager`. To avoid needless complexity, this **doesn't** always have the exact same output as the old code (but it does come close). See tests for the specifics. * The only mutation we do on React-captured error instances is setting the `componentStack` expando property. This replaces any previously-captured component stack rather than adding to it, and so doesn't create bloat. * We also report the exception fields `componentStack`, unformatted `message` (as `originalMessage`) and `name` directly to `NativeExceptionsManager` for future use. Reviewed By: cpojer Differential Revision: D16331228 fbshipit-source-id: 7b0539c2c83c7dd4e56db8508afcf367931ac71d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Along with facebook/react-native#25671, moves the RN-specific implementation of
ReactFiberErrorDialogfrom React to RN. This should only be merged (and subsequently synced to RN) after facebook/react-native#25671 lands.Also, with this, React doesn't use
ExceptionsManagerdirectly anymore, so we remove it from the RN private interface definition.