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: account for sourcemap in meta info #8778
fix: account for sourcemap in meta info #8778
Changes from 2 commits
c917eb1
903ba2e
10aadf4
61ff4ea
a6ddb2d
f4108c0
db686cf
a03ec02
f0ff443
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
it's confusing to me that we used a 1-based locator for
meta_locate
and then subtract 1. if we just used the default sourcemap offset we wouldn't have to deal with thatwe could make
meta_locate
use a separate 0-based locator. would that be more expensive though?or we could make
locate
be 0-based and then just add 1 when we're printing it out. I think that'd be clearer because sourcemaps are 0-based and then we can just treat everything in the codebase as being 0-based. islocate
exposed externally though and would that be a breaking change that results in a more difficult API for people needing to print stack traces?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.
This won't change much as the source mapping function works on 1-based lines so we have back and forth either way. I think the way it's now is the most consistent (both locate and meta_locate are 1-based) and you do whatever you need to do on the consumer side (and 1-based is needed more often)
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.