-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
whitespace trimming approach to fix #81 #179
Conversation
@bcoe this version fixes #172 (comment) |
@glromeo sorry for the slow turnaround, I don't have much time for OSS outside of work currently (so it goes). the node-fetch output looks identical, unless I'm missing something? Happen to have an example of the incorrect behavior in an HTML report, would love to see the fix in action visually. |
@bcoe no worries I understand...if anything thank you for carving out the time to look at my PR Indeed the coverage summaries are the same which is good but if you look carefully at the iteration count |
gotcha. |
@glromeo apologies for the delay on this, unfortunately it's hard to do much open source work with my day job. Would still love to land this work, as it seems like this and your other PR unblock some issues on |
@bcoe I am getting my head around the discrepancies and errors I now see since latest changes... I hope to have a fix soon |
@glromeo it looks like this work has stalled a bit, closing for now, but please feel free to pick up again. |
This PR aims at improving the precision of the v8 range mapping trimming the whitespaces.
e.g. #81 is caused by:
v8-to-istanbul/lib/v8-to-istanbul.js
Lines 179 to 181 in 53c1cd8
because the v8 startOffset is 50 while the line startCol is 48.
I introduced minCol and maxCol which take into account the gaps caused by whitespaces and now the matching
seems more accurate.
With the trimming in place c8 tests are all green except from the following 7 cases:
These differences look promising (the new range cover the method signatures which in the past were missing):
Instead I am still investigating these two cases (the min/max ranges seem to be remapped correctly by source maps while somethins is off with
this.rawSource
which breakstrimRange
):I preferred to open the PR early to start receiving feedback. I will try to keep the noise to the minimum though!
I am keen to optimise the code but that once we are sure that the changes in the coverage are all good.