-
Notifications
You must be signed in to change notification settings - Fork 511
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
[NetworkExtension] Updated completionHandler of handleAppMessage #16855
[NetworkExtension] Updated completionHandler of handleAppMessage #16855
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
👀 |
Per discussion with @mandel-macaque, to have a fix in until we make changes to the Generator, I changed argument of Action in HandleAppMessage signature to instead take new NETunnelAppMessageHandler delegate that contains [NullAllowed] NSData. Generated code:In SupportDelegates.cs:
In NETunnelProvider.g.cs:
|
🔥 [PR Build] Build failed 🔥Build failed for the job 'Build packages' Pipeline on Agent |
❗ API diff for current PR / commit (Breaking changes)Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:).NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)❗ API diff vs stable (Breaking changes)Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:).NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
void HandleAppMessage (NSData messageData, [NullAllowed] Action<NSData> completionHandler); | ||
|
||
void HandleAppMessage (NSData messageData, [NullAllowed] NETunnelAppMessageHandler completionHandler); |
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 is a breaking change, so we can't do it.
The correct way to do this would be to add a new method overload with the correct signature (the NETunnelAppMessageHandler
), and obsolete the old one, but that seems somewhat unnecessary since I believe it's possible to fix the old signature in a backwards compatible way once the generator is fixed.
In other words it might be best to wait until the generator is fixed.
HandleAppMessage as it appears in /src/build/Mac/full/NetworkExtension/NETunnelProvider.g.cs after running generator:
Export ("handleAppMessage:completionHandler:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public unsafe virtual void HandleAppMessage (
NSData messageData, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDActionArity1V37))]global::System.Action? completionHandler)
Fixes #16789