fix: Correctly interpret missing line/column numbers#129
Merged
loewenheim merged 4 commits intomasterfrom Jun 2, 2025
Merged
Conversation
Swatinem
approved these changes
Jun 2, 2025
loewenheim
added a commit
to getsentry/sentry
that referenced
this pull request
Aug 5, 2025
A recent sourcemap bug fix (getsentry/rust-sourcemap#129) results in some minified lines/columns being (correctly) unmapped. We cannot incorporate this bug fix into Symbolicator without first adjusting these tests because they are also run in the Symbolicator repo. This PR temporarily removes assertions about the unmapped frames so we can merge the fix (it's contained in getsentry/symbolicator#1749). After Symbolicator is merged we can properly assert that the frames in question are unmapped. As a side note, this entire test is somewhat bizarre. It was added in c5d2742 in more or less its current form. The first frame the test attempts to map has line 9 and column 2321, but no line in the source file fixture has that many columns (the test works regardless, but still, I can't fathom what the idea behind this is). Moreover, the fixture apparently got reformatted by mistake in the unrelated 6c11c9b, which makes no difference to the correctness of the test but makes it very confusing if you look at it in a sourcemap visualizer. Therefore we also restore the original fixture here.
andrewshie-sentry
pushed a commit
to getsentry/sentry
that referenced
this pull request
Aug 7, 2025
A recent sourcemap bug fix (getsentry/rust-sourcemap#129) results in some minified lines/columns being (correctly) unmapped. We cannot incorporate this bug fix into Symbolicator without first adjusting these tests because they are also run in the Symbolicator repo. This PR temporarily removes assertions about the unmapped frames so we can merge the fix (it's contained in getsentry/symbolicator#1749). After Symbolicator is merged we can properly assert that the frames in question are unmapped. As a side note, this entire test is somewhat bizarre. It was added in c5d2742 in more or less its current form. The first frame the test attempts to map has line 9 and column 2321, but no line in the source file fixture has that many columns (the test works regardless, but still, I can't fathom what the idea behind this is). Moreover, the fixture apparently got reformatted by mistake in the unrelated 6c11c9b, which makes no difference to the correctness of the test but makes it very confusing if you look at it in a sourcemap visualizer. Therefore we also restore the original fixture here.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 correctly interprets sourcemap tokens that only have a minified column number as "unmapped". Previously, such tokens would inherit the source line and column numbers from the last valid token, but that is incorrect. Now we set the numbers to
u32::MAXfor such cases.Fixes #105. Fixes RUSTSM-10.