Skip to content
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

NSOrderedCollectionDifference binding in Xcode 13 has issue with generic MonoPInvokeCallback and generator #15577

Open
chamons opened this issue Jul 26, 2022 · 0 comments
Labels
enhancement The issue or pull request is an enhancement
Milestone

Comments

@chamons
Copy link
Contributor

chamons commented Jul 26, 2022

As part of Xcode 13's Foundation changes (originally in #13328 but later in Xcode 14) this callback is needed:

		internal delegate NSOrderedCollectionDifference<NSObject>? NSOrderedCollectionDifferenceGetDifferenceHandlerProxy (IntPtr blockLiteral, /* NSOrderedCollectionChange */ IntPtr change);
		static readonly NSOrderedCollectionDifferenceGetDifferenceHandlerProxy static_ChangeAllback = GetDiffHandler;

		[MonoPInvokeCallback (typeof (NSOrderedCollectionDifferenceGetDifferenceHandlerProxy))]
		static NSOrderedCollectionDifference<NSObject>? GetDiffHandler (IntPtr block, IntPtr change)

However, both generator.cs and the cecil test MonoPInvokeCallback do not like the generic <NSObject> portion.

I removed it, and then the generator, cecil test, and Manuel's monotouch tests all pass however, we are not certain that is correct.

The base collection has:

    public sealed partial class NSOrderedCollectionDifference<TKey> : NSOrderedCollectionDifference
        where TKey : class, INativeObject {

So it can in theory have INativeObjects that are not NSObjects.

Manuel and I were not confident, so we are disabling those bindings with this issue tracking.

@chamons chamons added the enhancement The issue or pull request is an enhancement label Jul 26, 2022
@chamons chamons added this to the xcode14 milestone Jul 26, 2022
@dalexsoto dalexsoto modified the milestones: xcode14, Future Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue or pull request is an enhancement
Projects
None yet
Development

No branches or pull requests

2 participants