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

feat: Add new sourcemapcache subcrate and python bindings #688

Merged
merged 17 commits into from
Sep 23, 2022

Conversation

Swatinem
Copy link
Member

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

@Swatinem Swatinem requested a review from a team September 23, 2022 09:39
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2022

Codecov Report

Merging #688 (f9d20d0) into master (49f8e37) will increase coverage by 0.12%.
The diff coverage is 71.72%.

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     

Comment on lines +94 to +97
let mut buffer = Vec::new();
writer.serialize(&mut buffer)?;

let byteview = ByteView::from_vec(buffer);
Copy link
Member Author

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.

symbolic-cabi/src/sourcemapcache.rs Show resolved Hide resolved
@Swatinem Swatinem enabled auto-merge (squash) September 23, 2022 11:11
@Swatinem Swatinem merged commit f26b714 into master Sep 23, 2022
@Swatinem Swatinem deleted the feat/sourcemapcache branch September 23, 2022 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants