Skip to content

Conversation

loewenheim
Copy link
Contributor

@loewenheim loewenheim commented May 30, 2025

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::MAX for such cases.

Fixes #105. Fixes RUSTSM-10.

@loewenheim loewenheim merged commit 050d981 into master Jun 2, 2025
7 checks passed
@loewenheim loewenheim deleted the sebastian/tokens branch June 2, 2025 07:14
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect interpretation of mappings that only have a minified column

2 participants