Open sowenjub opened 6 months ago
Hey @sowenjub - I don't see a reason to believe this is caused by Sentry, can you explain? Did you try to reproduce without Sentry? To me it looks like the predicate and/or how it's used to query might be incorrect.
The query worked fine before I added Sentry, and still does if I don't init Sentry or if I disable Core Data tracing in the Sentry options.
The interruption points to Sentry code, the predicate generated by SwiftData includes a TERNARY operator which is not part of the supported operators in the function that crashes.
Ah yes you're right - we'll fix this, thanks for bringing it to our attention
I also have this issue using SwiftData and compound Predicates:
It works when sentry is removed
Platform
iOS
Environment
Develop
Installed
Swift Package Manager
Version
8.18
Did it work on previous versions?
no
Steps to Reproduce
Use a SwiftData predicate that generates a ternary operator, in my case the code looks something like this
Expected Result
Not crash
Actual Result
Crash in - (NSString *)comparisonPredicateDescription:(NSComparisonPredicate *)predicate because - (NSString *)predicateOperatorTypeDescription:(NSPredicateOperatorType)operator doesn't support TERNARY operator
Are you willing to submit a PR?
No response