-
Notifications
You must be signed in to change notification settings - Fork 645
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
Include sourcesContent in generated source map #85
Comments
Hi @bengourley! I think what you're describing is that the React Native Hermes integration doesn't preserve the |
Let's have the discussion on that other issue |
Looks like facebook/react-native#26086 was marked resolved, but assuming this was just an automatic closure due to the issue going stale. Has there been any progress on this? |
Out of curiosity, what is the use case for this? Is it for debugging or for something else? Hermes itself could populate the Another option is for Hermes to copy the sourceContent field of the input source map it is given. That should be pretty easy to do. Would any of these two options address the need? |
The latter would be the ideal solution – just preserving the orginal The use case for us (there may be others) is for when users upload their source maps to Bugsnag. We can only show the original code to our users when it is included in the source map – without it we can show the orginal line/col but not what code was there. |
Copying the sourceContent of the input source map, if present, should be easy. However, right now in the build process I don't think Hermes is given an input source map at all. So something has to be done in the React Native integration anyway. |
Summary: * Implements the `sourceContentFor` API from `source-map` in Metro's `Consumer`. * Copies source contents in `composeSourceMaps` if they exist. Related issues: facebook/react-native#26086, facebook/hermes#85. We'll be able to close the RN issue once this lands in the version of `metro-source-map` used in RN master. Differential Revision: D22284159 fbshipit-source-id: 996f485a95190319a6482da518dcf32a4e7a8a96
facebook/metro#574 will fix this on the React Native side. |
…#574) Summary: Pull Request resolved: #574 * Implements the `sourceContentFor` API from `source-map` in Metro's `Consumer`. * Copies source contents in `composeSourceMaps` if they exist. Related issues: facebook/react-native#26086, facebook/hermes#85. We'll be able to close the RN issue once this lands in the version of `metro-source-map` used in RN master. Reviewed By: cpojer Differential Revision: D22284159 fbshipit-source-id: ac3080ce772f664d7b58559f109b71a9252c325b
We don't currently have version information in the dll, which makes debugging and filtering crash dumps difficult.
When
react-native
's normal bundle command is executed with--sourcemap-output
, e.g:… the
sourcesContent
field of the source map is populated.The default behaviour in Hermes is to not include the
sourcesContent
field in the output source map, and I can't see a way to enable it.Having it on by default, or at least being able to include sources with an option, is a really useful feature that we (at Bugsnag) and our customers rely on. Can you let me know if there are plans to add this, or any objections to adding it?
Thanks!
The text was updated successfully, but these errors were encountered: