feat(auto_source): Use consistent stack trace granularity#101432
Merged
feat(auto_source): Use consistent stack trace granularity#101432
Conversation
Remove option and old code path from #101288.
armenzg
commented
Oct 14, 2025
| if len(parts) > 1: | ||
| # com.example.foo.bar.Baz$InnerClass, Baz.kt -> | ||
| # stack_root: com/example/foo/ | ||
| # stack_root: com/example/foo/bar/ |
Member
Author
There was a problem hiding this comment.
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 |
Member
Author
There was a problem hiding this comment.
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}): |
Member
Author
There was a problem hiding this comment.
Just removing the option and left indenting.
shashjar
reviewed
Oct 14, 2025
chromy
pushed a commit
that referenced
this pull request
Oct 17, 2025
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.