-
Notifications
You must be signed in to change notification settings - Fork 569
Include original function names in the source map #1085
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
Labels
Milestone
Comments
nevkontakte
added a commit
to nevkontakte/gopherjs
that referenced
this issue
Jul 10, 2022
- Avoid use of unsafe in TestNestedMethods and TestEmbeddedMethods. - Skip TestNotInHeapDeref and TestMethodCallValueCodePtr, which concern low-level GC and heap details, inapplicable to GopherJS. - Skip TestIssue50208 until generics are supported. - Add a hack into methodNameSkip() to make method names match what the tests expect. gopherjs#1085 would be a better long-term solution. - Stub out verifyNotInHeapPtr(), which is also not applicable to GopherJS.
nevkontakte
added a commit
to nevkontakte/gopherjs
that referenced
this issue
Jul 10, 2022
- Avoid use of unsafe in TestNestedMethods and TestEmbeddedMethods. - Skip TestNotInHeapDeref and TestMethodCallValueCodePtr, which concern low-level GC and heap details, inapplicable to GopherJS. - Skip TestIssue50208 until generics are supported. - Add a hack into methodNameSkip() to make method names match what the tests expect. gopherjs#1085 would be a better long-term solution. - Stub out verifyNotInHeapPtr(), which is also not applicable to GopherJS.
nevkontakte
added a commit
to nevkontakte/gopherjs
that referenced
this issue
Aug 3, 2024
JS function names are subtly different from what vanilla Go may expect, unless gopherjs#1085 is implemented. It turns out that a combination of d5771cc and 22c65b8 subtly changes how node outputs stack trace in a way that breaks my workarounds in the reflect package. Instead of further fumbling, I am going to disable the offending tests temporarily, and I have a proper fix for gopherjs#1085 in the works, which will allow us to re-enable them along with a few other tests.
nevkontakte
added a commit
to nevkontakte/gopherjs
that referenced
this issue
Aug 3, 2024
The main change in this commit is an ability to use identifier name mapping, which we use to show original function names in the source map. This addresses the long-standing gopherjs#1085, where GopherJS call stacks were somewhat difficult to interpret due to function name mangling, especially in minified form. Now we emit an additional source map hit with the original function name, which Node is able to pick up. While at it, I moved source map hinting logic into its own package with tests and added some documentation on how it works. Now it should be easy to extend this mechanism for even richer source maps if we want to.
nevkontakte
added a commit
to nevkontakte/gopherjs
that referenced
this issue
Aug 5, 2024
The main change in this commit is an ability to use identifier name mapping, which we use to show original function names in the source map. This addresses the long-standing gopherjs#1085, where GopherJS call stacks were somewhat difficult to interpret due to function name mangling, especially in minified form. Now we emit an additional source map hit with the original function name, which Node is able to pick up. While at it, I moved source map hinting logic into its own package with tests and added some documentation on how it works. Now it should be easy to extend this mechanism for even richer source maps if we want to.
nevkontakte
added a commit
to nevkontakte/gopherjs
that referenced
this issue
May 9, 2025
The main change in this commit is an ability to use identifier name mapping, which we use to show original function names in the source map. This addresses the long-standing gopherjs#1085, where GopherJS call stacks were somewhat difficult to interpret due to function name mangling, especially in minified form. Now we emit an additional source map hit with the original function name, which Node is able to pick up. While at it, I moved source map hinting logic into its own package with tests and added some documentation on how it works. Now it should be easy to extend this mechanism for even richer source maps if we want to.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While GopherJS tends to name JS functions similar to the Go ones, the names in the stack trace don't match exactly, which tends to break code that expects particular formatting of the stack trace function names.
relevantCaller()
innet/http
package is the most recent example I came across:There's also an obvious benefit to the debugging experience of being able to more easily identify functions in the call stack.
The text was updated successfully, but these errors were encountered: