-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Refactor JS sourcemap generator #21053
Conversation
Didn't have space after the path
Sources would sometimes double up with a new line at the end
Removes the multiple translations needed, now goes from single high level type to the final SourceMap Adds documentation for procs
Files aren't linking correctly though
Lines are sometimes off but overall seems pretty good Just need to implement parser
Does any work need to be done on this still? |
Just need to reimplement the tokenizer. Other than that it works fairly well. |
Add sourceMappingURL to rope directly to prevent copy
Just finishing up writing a test case and then it should be all ready |
Hurry up please, we need to have this in 2.0 RC 1. |
Ok test case is written and passes locally. Should stop this regression in future |
The CI isn't happy though: FAIL: tests/js/tsourcemap.nim js -d:release You can test this locally via:
|
Running that still passes locally so think I might have a config difference somewhere. |
Thanks for your hard work on this PR! Hint: mm: orc; opt: speed; options: -d:release |
* Parse the new line format * Fix pattern Didn't have space after the path * Remove duplicate sources Sources would sometimes double up with a new line at the end * Remove unused variable * Refactor sourcemap.nim Removes the multiple translations needed, now goes from single high level type to the final SourceMap Adds documentation for procs * Line numbers line up properly now Files aren't linking correctly though * Files now link up correctly Lines are sometimes off but overall seems pretty good Just need to implement parser * Add column info to output Add sourceMappingURL to rope directly to prevent copy * Properly handle columns * Remove debug lines * Add testcase * Finish testcase * Use the outdir folder instead of the folder the test is in to find the sourcemap Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Parse the new line format * Fix pattern Didn't have space after the path * Remove duplicate sources Sources would sometimes double up with a new line at the end * Remove unused variable * Refactor sourcemap.nim Removes the multiple translations needed, now goes from single high level type to the final SourceMap Adds documentation for procs * Line numbers line up properly now Files aren't linking correctly though * Files now link up correctly Lines are sometimes off but overall seems pretty good Just need to implement parser * Add column info to output Add sourceMappingURL to rope directly to prevent copy * Properly handle columns * Remove debug lines * Add testcase * Finish testcase * Use the outdir folder instead of the folder the test is in to find the sourcemap Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Parse the new line format * Fix pattern Didn't have space after the path * Remove duplicate sources Sources would sometimes double up with a new line at the end * Remove unused variable * Refactor sourcemap.nim Removes the multiple translations needed, now goes from single high level type to the final SourceMap Adds documentation for procs * Line numbers line up properly now Files aren't linking correctly though * Files now link up correctly Lines are sometimes off but overall seems pretty good Just need to implement parser * Add column info to output Add sourceMappingURL to rope directly to prevent copy * Properly handle columns * Remove debug lines * Add testcase * Finish testcase * Use the outdir folder instead of the folder the test is in to find the sourcemap Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Refactors the source map generator so that line information is properly serialised into source map
Closes #21052
The refactoring allows for better source maps since we now have column info stored also.
For example stack traces now map to nim lines