-
Notifications
You must be signed in to change notification settings - Fork 2
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
Initial implementation of parseCrashes() #1
Initial implementation of parseCrashes() #1
Conversation
…ns. Refactored code based on PR comments.
@TwitchBronBron What about the redundant information in |
There might be situations where there are pkg paths not found inside a crash. The Perhaps for |
…e` which is a pointer to a `CrashlogFile.references` entry.
@TwitchBronBron Update:
|
|
||
const match = /(\w+:\/.*?)\((\d+)\)/.exec(pkgLocationAsArray.join(' ').trim()); | ||
if (match) { | ||
// We need the range to calculate the reference index. To generate the range, we need the line number. |
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.
@TwitchBronBron I honestly couldn't think of a more elegant solution for this. I wanted to make the subparsers for each crash section agnostic to the order of the sections, so Roku can miss sending, for example, the hardware information and the parser could still figure out the stack trace. This resulted in the subparser for the stack trace not having the original line number for each of its section lines. Hence this code...
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.
If it's accurate, then I'm fine with this for now. We can improve this over time.
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.
Everything looks good here. Is there anything else to do before I merge this? The only thing I can see is to get the CI failures fixed.
@TwitchBronBron Yep, just wait for me to fix the coverage problem. |
The base tool structures only the paths found in the crash report. The goal of this PR is to also structure the remaining information for each crash:
Not only the code name but also additional information (taken from here) like the product name and the model, e.g: Roku Ultra, model 4800X.This structured list of crashes is stored in
CrashlogFile.crashes
. NowCrashlogFile.crashes
andCrashlogFile.references
have redundant information, but I have not removed the latter because I don't know much about the codebase outside ofCrashlogFile
.I have left some TODOs with questions. Please address them adding comments to the PR.