-
Notifications
You must be signed in to change notification settings - Fork 47
[fix]: drop invalidated sink events instead of crashing #234
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
square-tomb
left a comment
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.
Nice test!
| handler(event) | ||
|
|
||
| case .invalid: | ||
| fatalError("[\(WorkflowType.self)] Sink sent an action after it was invalidated. Sinks can only be used for a single valid `Rendering`.") |
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.
This should be pretty uncommon, right? Would it make sense to at least log to BugSnag if this happens in production?
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.
yes i believe it's fairly uncommon, at least according to our existing bugsnag data. we don't actually currently have a straightforward mechanism to log errors/warnings to something listening from outside of this module, so that can be taken up as a follow-on task.
ef9634c to
fdaa827
Compare
f95166d to
af3e543
Compare
Issue
the issue manifests in the following scenario:
Changes
i asked around, and it seems that the Kotlin runtime has not enforced this hard assertion for some time, and i could not think of a compelling reason to continue doing it.
Checklist