Skip to content

Conversation

@armenzg
Copy link
Member

@armenzg armenzg commented Oct 14, 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.

Remove option and old code path from #101288.
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 14, 2025
@armenzg armenzg changed the title chore(auto_source): Remove option feat(auto_source): Use consistent granularity Oct 14, 2025
@armenzg armenzg self-assigned this Oct 14, 2025
@armenzg armenzg changed the title feat(auto_source): Use consistent granularity feat(auto_source): Use consistent stack trace granularity 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/
Copy link
Member Author

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
Copy link
Member Author

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}):
Copy link
Member Author

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.

@armenzg armenzg marked this pull request as ready for review October 14, 2025 15:26
@armenzg armenzg requested review from a team as code owners October 14, 2025 15:26
Copy link
Member

@shashjar shashjar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 🎉

@armenzg armenzg merged commit 9e6929f into master Oct 15, 2025
65 checks passed
@armenzg armenzg deleted the 0/remove_option/java/armenzg branch October 15, 2025 11:03
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.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants