Better detection that a value should be pushed#16
Merged
vmihailenco merged 1 commit intogo-sourcemap:masterfrom Nov 19, 2021
Merged
Better detection that a value should be pushed#16vmihailenco merged 1 commit intogo-sourcemap:masterfrom
vmihailenco merged 1 commit intogo-sourcemap:masterfrom
Conversation
vmihailenco
reviewed
Nov 19, 2021
| {genLine: 7, genColumn: 30, sourceLine: 3, sourceColumn: 27, namesInd: -1}, | ||
| {genLine: 7, genColumn: 31, sourceLine: 4, sourceColumn: 1, namesInd: -1}, | ||
| {genLine: 7, genColumn: 32, sourceLine: 4, sourceColumn: 1, namesInd: -1}, | ||
| {genLine: 9, genColumn: 0, sourceLine: 1, sourceColumn: 0, namesInd: -1}, |
Member
There was a problem hiding this comment.
This line says that 9:0 should be mapped to 1:0 which does not make much sense...
Contributor
Author
There was a problem hiding this comment.
it's what babel generated and https://sokra.github.io/source-map-visualization/ works with it 🤷 it is actually pointing to the first line and the line is import .... so 🤷
Member
There was a problem hiding this comment.
Okay, I guess generators are free to reorder the code...
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 probably should get more tests, but I got this particular mapping while trying some things around grafana/k6#2082 and it turned out to totally not work because it was pointing to 1:0 in the original file.
The source map is generated from (a very old version of) babel so I think it's possible for something else to generate a similar source map and for it to not be parsed correctly.