-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(auto_source): Use consistent stack trace granularity #101432
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
Conversation
Remove option and old code path from #101288.
| if len(parts) > 1: | ||
| # com.example.foo.bar.Baz$InnerClass, Baz.kt -> | ||
| # stack_root: com/example/foo/ | ||
| # stack_root: com/example/foo/bar/ |
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.
All cases inside of this if/clause will use STACK_ROOT_MAX_LEVEL rather than STACK_ROOT_MAX_LEVEL - 1 in some cases.
This will create a lot more code mappings (storage cost) but it will make everything more consistent an easier to debug (human cost & quality).
We're already incurring this cost since this morning when I enabled the option. I'm just making it clearer in the code.
| create_frame_info(frame, "java") | ||
|
|
||
| # Only necessary while auto_source_code_config.multi_module_java is used | ||
| @pytest.mark.django_db |
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.
We added this in the previous PR since we add to check options.
| self.frame_from_module(f"{java_module_prefix}.foo.Bar", "Bar.kt"), | ||
| self.frame_from_module(f"{java_module_prefix}.bar.Baz", "Baz.kt"), | ||
| ] | ||
| with self.options({"auto_source_code_config.multi_module_java": True}): |
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.
Just removing the option and left indenting.
shashjar
left a comment
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.
nice 🎉
This makes the granularity of the stack root consistent rather than trying to optimize number of created code mappings. This also removes the option and old code path from #101288.
This makes the granularity of the stack root consistent rather than trying to optimize number of created code mappings.
This also removes the option and old code path from #101288.