-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix: Improve trimming of Swift function names #72335
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #72335 +/- ##
=======================================
Coverage 77.97% 77.97%
=======================================
Files 6583 6582 -1
Lines 293419 293501 +82
Branches 50629 50644 +15
=======================================
+ Hits 228781 228870 +89
+ Misses 58343 58330 -13
- Partials 6295 6301 +6
|
0e18148
to
4ac9f33
Compare
Some Swift for Windows function names were trimmed to incorrect tokens in the UI, resulting in hard-to-read stack traces. For instance, some functions were shown as "throws" and closures were shown as "getsentry#1". This change fixes the former issue by using the correct function name. Closures are now displayed as "closure in <function name>", and initialization expressions are displayed as "initializer expression of <value>", improving the user experience when browsing stack traces.
4ac9f33
to
100c85c
Compare
thanks for the PR! looking at this now. will make sure it gets reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems good to me, but I think we should keep the closure number.
A function (specially in SwiftUI) may have many closures.
closure #2 in MediaSlideshow.toSources
sounds more helpful
The closure code is hard to parse, especially when we are dealing with closures in closures. Right now, on macOS, we just display |
Some Swift for Windows function names were trimmed to incorrect tokens in the UI, resulting in hard-to-read stack traces. For instance, some functions were shown as
"throws"
and closures were shown as"#1"
.This change fixes the former issue by using the correct function name. Closures are now displayed as
"closure in <function name>"
, and initialization expressions are displayed as"initializer expression of <value>"
, improving the user experience when browsing stack traces.Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.