-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(code-mappings): Add new function for applying code mappings to s…
…tack frames (try 2) (#63128) There are a couple problems with the current code mapping flow that are addressed in this commit: 1. Code mapping logic is duplicated (and slightly different) in stacktrace linking and suspect commits. To ensure a consistent experience, stacktrace linking and suspect commits should apply code mappings in a similar way. By introducing a new function convert_stacktrace_frame_path_to_source_path(), we can use it in both locations to guarantee that the implementations do not diverge. (Note that this function is tested but not yet used - will update stacktrace linking and suspect commits in a separate PR) 2. Code mappings only apply to filename, not abs_path Certain platforms have trouble creating valid code mappings because filename only contains the file name and the folder structure is in abs_path (see #43516 (comment)). By adding it as a fallback check in convert_stacktrace_frame_path_to_source_path() we can support these platforms. Related to the above concern with abs_path, I also modified get_sorted_code_mapping_configs() to check for absolute paths in the stack_root while sorting code mappings. Without this check, the sorting does not work as expected.
- Loading branch information
Showing
4 changed files
with
218 additions
and
76 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.