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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(common): Fix handling of input source maps #6561
fix(common): Fix handling of input source maps #6561
Changes from 14 commits
71d3cfc
1efa944
81537e8
c729d9c
6ecbec9
ff145a0
767c047
4d1873d
ea276d9
2ad8cc1
7ff08d4
c638250
d724867
2b636f2
f65e03b
87115e7
ad868d0
d02f8a7
811d3a3
e0ab2ad
5d5cdff
8ecee8d
9939ca0
96f07c5
ddaabee
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's actually (what I consider to be) a bug in
lookup_token
, where it'll return an a mapping span on a previous line for spans that:I tried to get them to fix it in getsentry/rust-sourcemap#53, but they rejected it. This breaks with Mozilla's source map behavior, because lines endings are supposed to split the mapping from any previous one.
Anyways, the "fix" is to do:
Is this the bug you're trying to fix with the
find
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the reason, but it didn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh, we probably have an off-by-one. The visualized link you posted is definitely doing the lookup on the wrong line. The sourcemap crate uses 0-based lines, based on the readme example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice we're not pulling the
name
from the found token, which means we'll always the name found in SWC's input. But, the name could have already been changed by whatever preceeded SWC.