-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
fix: increase IL2CPPP source mapping boundary #776
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #776 +/- ##
==========================================
+ Coverage 74.70% 74.99% +0.29%
==========================================
Files 71 71
Lines 15416 15561 +145
==========================================
+ Hits 11516 11670 +154
+ Misses 3900 3891 -9 |
4f7777d
to
4658d31
Compare
let cpp_lines = cpp_source.split('\n').collect::<Vec<_>>(); | ||
let clean_cpp_lines = cpp_lines | ||
.iter() | ||
.map(|line| line.split_once('|').unwrap().0.trim_end()) |
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.
there is also rsplit_once
here and below.
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.
on a second look, I've restructured this part. It came together iteratively and could have been written cleaner, so I did that now.
assert_eq!(parsed_mapping.lookup("main.cpp", 5), Some(("main.cs", 17))); | ||
assert_eq!(parsed_mapping.lookup("main.cpp", 12), None); | ||
assert_eq!(parsed_mapping.lookup("main.cpp", 6), Some(("main.cs", 17))); |
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 might be a bit overkill here to enumerate every line. the important one I guess is that 12
now has a mapping.
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.
it may be but it also makes the expectation clear (and removes the guesswork) so if you don't mind I'd keep it there for each line
f25e915
to
0e2ac01
Compare
0e2ac01
to
d1dcd4e
Compare
In response to getsentry/sentry-unity#1239 and after manually sampling through some generated source files, this PR increases the boundary on the lines that are considered matching. From what I've seen so far, it should not increase false positive matches (significantly) but it should provide much better result for actual code that often spans ~30 lines for a block of
source_info
comments.Closes getsentry/sentry-unity#1239