You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to integrate reportIssue directly into our logging system so that anytime an error message is logged, reportIssue is also called. However, even though we are explicitly passing file location metadata (fileID, filePath, line, column), the runtime warning still appears on the line where reportIssue is called, rather than the location that is passed through (where the actual error would be).
Is this a bug, or just a known limitation? I've noticed that by passing the location through, I can see the warning listed with the correct location on the left side of my Xcode, but the warning itself still appears on the line where reportIssue is called. See my screenshot below, which shows the runtime warning on reportIssue, but the location being passed through is pointing to a different file entirely.
Steps to Reproduce
Create a logging function that calls reportIssue, passing in fileID, filePath, line, and column.
Use the function.
Observe that the purple runtime warning appears on the reportIssue line instead of where the function was called, despite the location being passed in to reportIssue.
Hi @rockyev, @jshier is correct. You must make your helpers @_transparent in order for the purple runtime warning to be emitted at the caller of the function. It's annoying, but also Apple does not actually give us a public way of emitting these kinds of warnings. We are doing hacky things to unlock this functionality, and it's the best we can do.
Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there!
Activity
jshier commentedon Mar 19, 2025
Functions must also be marked
@_transparentfor that passthrough to work properly.mbrandonw commentedon Mar 20, 2025
Hi @rockyev, @jshier is correct. You must make your helpers
@_transparentin order for the purple runtime warning to be emitted at the caller of the function. It's annoying, but also Apple does not actually give us a public way of emitting these kinds of warnings. We are doing hacky things to unlock this functionality, and it's the best we can do.Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there!