Skip to content
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

Source Map Support #12

Open
cretz opened this issue Dec 20, 2017 · 1 comment
Open

Source Map Support #12

cretz opened this issue Dec 20, 2017 · 1 comment

Comments

@cretz
Copy link
Owner

cretz commented Dec 20, 2017

Support source maps. The problem is the JVM only supports a single SourceFile attribute. So I'm thinking maybe use SourceDebugAttribute to store filename-to-method map, then use "" as the SourceFile then maybe provide some runtime thing to translate stack traces. Or maybe, add an attribute on top of each method saying what source file it comes from (but has to be runtime visible). Or maybe, add a static method on the module that will translate method + line number to source file + line number. Actually, that would just translate method name to source file name, because line number would already be accurate.

@cretz
Copy link
Owner Author

cretz commented Mar 3, 2018

This is essentially what https://stackoverflow.com/questions/11250834/how-to-add-jsr-045-smap-information-to-java-stacktraces-at-runtime means wrt https://jcp.org/en/jsr/detail?id=45. So, yeah, an opt-in that would store this information as the JSR mentions and/or in another source map form, and maybe a static method as mentioned that would do the translate.

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

No branches or pull requests

1 participant