-
Notifications
You must be signed in to change notification settings - Fork 868
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
Support source maps #1308
Comments
Could you please clarify exactly what you're requesting? The way your request is currently worded, it sounds like you're just requesting column number support, which, if added, would automatically cause Rhino to support sourcemaps. If so, where do you expect column numbers to appear/be supported in Rhino? If after adding column number support in the relevant places more is needed to (fully) support sourcemaps in Rhino, please elaborate or better yet open a separate case for that. Any chance you're willing and able to take a stab at it and provide a PR? |
Assuming the idea is to 'just' translate line & column numbers on stacktraces, I could see an API that allows you to register a 'SourceMapper' and when registered, Rhino calls that to convert line and column numbers The actual 'SourceMapper' implementation is then pluggable and could be for example (a wrapper around) https://github.com/atlassian/sourcemap For completeness, this seems the specifications of sourcemaps: https://docs.google.com/document/u/0/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/mobilebasic?pli=1 |
Just FYI: Looks like there will be an effort to officially standardize sourcemaps: https://ecma-international.org/news/ecma-tc39-ecmascript-initiates-a-new-task-group-to-standardize-source-maps/ |
I think getting line and column numbers attached to errors is unrelated to any new standards - that would only be if we wanted to respect the standard when reporting the error. Which, I suppose would also be nice. |
Following up on this old comment, I wanted to log an issue for supporting column numbers and thus support source maps in rhino.
The text was updated successfully, but these errors were encountered: