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

[RN] Use react_native_context.hermes_debug_info #1448

Open
krystofwoldrich opened this issue Apr 26, 2024 · 0 comments
Open

[RN] Use react_native_context.hermes_debug_info #1448

krystofwoldrich opened this issue Apr 26, 2024 · 0 comments

Comments

@krystofwoldrich
Copy link
Member

krystofwoldrich commented Apr 26, 2024

React Native Hermes events contain information about the runtime bundle which can be used to return from the symbolication process early and inform user about the incorrect source map type.

Depending on the way RN application with Hermes was build the Hermes bundle can contain debug information, this mean the engine will emit JS frames which can be symbolicated by packager JS source map.

If Hermes bundle doesn't contain debug information Hermes source map is needed.

contexts.react_native_context.hermes_debug_info=boolean is true when the runtime bundle contained the debug information otherwise false and not present if the event is from RN without Hermes.

Pseudocode:

if (source_map.type == 'hermes' && event.contexts.react_native_context.hermes_debug_info == true) {
    throw 'packager source map is needed' 🚨
} else {
    // JSC or Hermes with debug info and packager source map ✅
    symbolicate()
}
@krystofwoldrich krystofwoldrich changed the title [React Native]: Utilize contexts.react_native_context.hermes_debug_info=boolean [React Native]: Utilize react_native_context.hermes_debug_info Apr 26, 2024
@krystofwoldrich krystofwoldrich changed the title [React Native]: Utilize react_native_context.hermes_debug_info [RN]: Utilize react_native_context.hermes_debug_info Apr 26, 2024
@krystofwoldrich krystofwoldrich changed the title [RN]: Utilize react_native_context.hermes_debug_info [RN] Use react_native_context.hermes_debug_info Apr 26, 2024
@krystofwoldrich krystofwoldrich moved this from Needs Discussion to Blocked in Mobile & Cross Platform SDK May 3, 2024
@krystofwoldrich krystofwoldrich moved this from Blocked to Backlog in Mobile & Cross Platform SDK May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant