Skip to content

Fix off-by-one error with sourcemaps #24982

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

Merged
merged 2 commits into from
Jun 15, 2018
Merged

Fix off-by-one error with sourcemaps #24982

merged 2 commits into from
Jun 15, 2018

Conversation

rbuckton
Copy link
Contributor

We had a discrepancy in our source map encoding and decoding logic, where we encoded source maps using 1-based line/column offsets, but decoded source maps using 0-based line/column offsets. This off-by-one error became apparent when we switched away from index maps into a merged source map for project reference builds. This PR switches all source map encoding and decoding to 0-based line/column offsets to align both and simplify the math involved.

@rbuckton rbuckton merged commit b979413 into master Jun 15, 2018
@rbuckton rbuckton deleted the sourceMapBase branch June 15, 2018 08:07
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.

2 participants