Last crash detection API parity between SDK's
For last-crash detection API across SDKs. With sentry-native, if you're using sentry_get_crashed_last_run(), then you also need to call sentry_clear_crashed_last_run() so you won't redetect an older crash on later runs.
I believe in cocoa it's automatically reset based on: https://github.com/getsentry/sentry-cocoa/blob/main/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_AppState.c#L459
So can we also make sure the native SDK automatically manages this as much as possible?
Clearing automatically could be problematic if this is called from multiple places. IIRC that was the case when this was originally implemented.
Instead, maybe we should change how it's implemented to avoid the need to clear at all. Maybe we could, for example, have a run identifier (number) which increases on runs/failures?
@jpnurmi This also relates to #1303 and might be considered from the POV of that PR (even if not rectified there).
Clearing automatically could be problematic if this is called from multiple places. IIRC that was the case when this was originally implemented.
I am missing context here. What do you mean by "this is called from multiple places"? Threads/processes or just call sites? Because we could make this an option (where the default would be a breaking change if I understood the intent of the issue correctly). Wouldn't the same problem apply to the SDKs that implement it in the proposed manner?