Open sindresorhus opened 4 months ago
Thanks for opening this. It might be related to https://github.com/getsentry/sentry-cocoa/issues/3081.
I dug into this a little bit, and it turns out that when you use Verbose Function Names
, both of these are prefixed with get_witness_table
, which is being generated right here:
Swifts own demangler does not recognize that, as is it does not start with a proper swift mangling prefix. (Admittedly, our demangler is based on Swift 5.5.1 which is a bit out of date)
However, if I replace that with the proper prefix ($s
), I get the following:
<A>concrete protocol conformance ModifiedContent<A, OnSubmitModifier>protocol conformance ref (type's module) Viewdependent root protocol conformance #0 AViewconcrete protocol conformance OnSubmitModifierprotocol conformance ref (type's module) ViewModifier
<A>concrete protocol conformance ModifiedContent<A, _DefaultFocusModifier>protocol conformance ref (type's module) Viewdependent root protocol conformance #0 AViewconcrete protocol conformance _DefaultFocusModifierprotocol conformance ref (type's module) ViewModifier
That is quite a mouthful, and TBH I have no idea what any of that means.
Long story short, the compiler has to output a proper swift symbol with the proper prefix for it to be demangled properly.
But it might also be related to #3081 as @philipphofmann mentioned, as its quite possible that we just end up trying to demangle the name of some static data table because we lack access to proper debug symbols.
If I got it right @Swatinem, except from doing https://github.com/getsentry/sentry-cocoa/issues/3081 there isn't much we can do right now, except to wait for Apple to provide proper dSYMs for SwiftUI?
Indeed, we need to have a proper dSYM, otherwise its hard to move forward on any of this.
Platform
macOS
Environment
Production
Installed
Swift Package Manager
Version
8.24.0
Did it work on previous versions?
No
Steps to Reproduce
Look at this report: https://sindresorhus.sentry.io/share/issue/0e4faa9089734b2bbe498a1e876fb30e/
In the stack trace:
Expected Result
I expected them to be demangled.
Actual Result
They are not demangled.
Are you willing to submit a PR?
No