-
Notifications
You must be signed in to change notification settings - Fork 12
V8: debug_id extraction and passing as build id for source mapping
#179
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
base: column-info
Are you sure you want to change the base?
Conversation
| pid := pr.PID() | ||
| symbolReporter reporter.SymbolReporter, pr process.Process, mappings []process.Mapping, | ||
| ) error { | ||
| i.reporter = symbolReporter |
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.
I'm a bit skeptical about doing this, please let me know if there is a better way to get the symbolReporter in the appendFrames function.
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.
You could change the Symbolize function to accept it, and then pass it down in processmanager/manager.go. But that will require you to change every interpreter. IMO, if you don't want to do that, this way is probably fine.
|
|
||
| // debugIDRegex matches the debug ID magic comment at the end of JS files | ||
| // Pattern: //# debugId=550e8400-e29b-41d4-a716-446655440000 | ||
| var debugIDRegex = regexp.MustCompile(`//# debugId=([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})`) |
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.
Should we verify this occupies an entire line by itself?
| pid := pr.PID() | ||
| symbolReporter reporter.SymbolReporter, pr process.Process, mappings []process.Mapping, | ||
| ) error { | ||
| i.reporter = symbolReporter |
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.
You could change the Symbolize function to accept it, and then pass it down in processmanager/manager.go. But that will require you to change every interpreter. IMO, if you don't want to do that, this way is probably fine.
This PR implements the extraction of the debugId from the magic comment of the js file and passing that as part of the
framedata, so that this can be used to source map thelocationson the server.