-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: Add new sourcemapcache
subcrate and python bindings
#688
Conversation
The Metro/Hermes SourceMaps have scopes embedded in them which we now prefer. In that case, we can completely skip parsing and extracting scopes from the minified JS.
* fix(sourcemapcache): Handle files with no name * ref(sourcemapcache): Use token.get_src_id directly for sl.file_idx * ref(sourcemapcache): Remove redundant str/bytes decoding in py bindings Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #688 +/- ##
==========================================
+ Coverage 73.11% 73.24% +0.12%
==========================================
Files 84 91 +7
Lines 17526 18304 +778
==========================================
+ Hits 12814 13406 +592
- Misses 4712 4898 +186 |
let mut buffer = Vec::new(); | ||
writer.serialize(&mut buffer)?; | ||
|
||
let byteview = ByteView::from_vec(buffer); |
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 holds the sourcemapcache buffer in memory. Not sure its worth putting in the API to write it to disk, and to read/map it from disk right now. But we should think about that rather sooner than later.
The new subcrate offers functionality to build a fast lookup index for resolving minified JS line/column to their original line/column/file and function name using information extracted from a provided minified source and its corresponding sourcemap.
This functionality is also exposed via the symbolic python API to be used by the sentry monolith, see getsentry/sentry#38551