-
Notifications
You must be signed in to change notification settings - Fork 131
Interop: send events to fallback event handler if active configuration not present #1439
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
base: main
Are you sure you want to change the base?
Interop: send events to fallback event handler if active configuration not present #1439
Conversation
| } | ||
|
|
||
| // Encode the event as JSON and pass it to the handler. | ||
| let encodeAndInvoke = ABI.CurrentVersion.eventHandler(encodeAsJSONLines: false) { |
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.
You might want to cache this event handler somewhere as there's a bit of runtime overhead to generating it. Remember the fallback event handler can't change after its initial assignment, and will be set by the time an event is generated, so we don't need to worry about it having changed on later calls (i.e. the closure we generate here can permanently capture it.)
988b54d to
2dd0432
Compare
As part of the strategy for enabling interoperability, unhandled issues can be turned into events and sent to the fallback event handler. Also link against the _TestingInterop framework/library (depending on the platform), which provides a function to lookup the currently installed fallback event handler.
2dd0432 to
6736ad8
Compare
Create helper to post test events to fallback event handler
As part of the strategy for enabling interoperability, unhandled issues
can be turned into events and sent to the fallback event handler.
Also link against the _TestingInterop framework/library (depending on
the platform), which provides a function to lookup the currently
installed fallback event handler.