Skip to content

Commit

Permalink
[AppKit] Remove a few obsolete members in .NET (#14043)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Feb 4, 2022
1 parent 3a2acf9 commit d766fe8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
7 changes: 2 additions & 5 deletions src/appkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8213,7 +8213,7 @@ interface NSGestureRecognizerDelegate {
[Export ("gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:"), DelegateName ("NSGesturesProbe"), DefaultValue (false)]
bool ShouldBeRequiredToFail (NSGestureRecognizer gestureRecognizer, NSGestureRecognizer otherGestureRecognizer);

#if !XAMCORE_4_0
#if !NET
[Export ("xamarinselector:removed:"), DelegateName ("NSGestureEvent"), DefaultValue (true)]
[Obsolete ("It will never be called.")]
bool ShouldReceiveEvent (NSGestureRecognizer gestureRecognizer, NSEvent gestureEvent);
Expand Down Expand Up @@ -11471,15 +11471,12 @@ interface NSPasteboardReading {
[Export ("readingOptionsForType:pasteboard:")]
NSPasteboardReadingOptions GetReadingOptionsForType (string type, NSPasteboard pasteboard);

#if !XAMCORE_4_0
#if !NET
// This binding is just broken, it's an ObjC ctor (init*) bound as a normal method.
[Abstract]
[Export ("xamarinselector:removed:")]
[Obsolete ("It will never be called.")]
NSObject InitWithPasteboardPropertyList (NSObject propertyList, string type);
#else
#error FIXME: (compiler error to not forget)
#error FIXME: figure out how to bind constructors in protocols.
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion tests/introspection/Mac/MacApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected override bool Skip (Type type, string selectorName)
// The header declares this on an NSObject category but
// it doesn't even respondsToSelector on NSView/NSCell...
return true;
#if !XAMCORE_4_0
#if !NET
case "xamarinselector:removed:":
return true;
#endif
Expand Down
6 changes: 2 additions & 4 deletions tests/monotouch-test/AppKit/NSPasteboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ class MyPasteboard2 : NSObject, INSPasteboardReading
class MyPasteboard2 : NSPasteboardReading
#endif
{
#if NET
NSObject INSPasteboardReading.InitWithPasteboardPropertyList (NSObject propertyList, string type)
#else
#if !NET
public override NSObject InitWithPasteboardPropertyList (NSObject propertyList, string type)
#endif
{
return new NSObject ();
}
#endif
}

#if NET
Expand Down
2 changes: 0 additions & 2 deletions tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@

## unsorted

!extra-protocol-member! unexpected selector NSGestureRecognizerDelegate::xamarinselector:removed: found
!extra-protocol-member! unexpected selector NSPasteboardReading::xamarinselector:removed: found
!missing-enum! NSWritingDirectionFormatType not bound
!missing-field! NSAuthorDocumentAttribute not bound
!missing-field! NSBackgroundColorDocumentAttribute not bound
Expand Down

4 comments on commit d766fe8

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

API Current PR diff

ℹ️ API Diff (from PR only) (please review changes)

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

Generator diff

ℹ️ Generator Diff (please review changes)

Packages generated

View packages

Test results

6 tests failed, 229 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 2763 Passed: 2569 Inconclusive: 11 Failed: 2 Ignored: 192)
  • dont link/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Test run crashed (exit code: 134).
    No test log file was produced)
  • introspection/iOS Unified 64-bits - simulator/Debug (iOS 12.4) [dotnet]: Failed
  • introspection/iOS Unified 64-bits - simulator/Debug (iOS 12.4): Failed
  • introspection/tvOS - simulator/Debug (tvOS 12.4) [dotnet]: Failed
  • introspection/tvOS - simulator/Debug (tvOS 12.4): Failed

Pipeline on Agent XAMMINI-068.BigSur'
[AppKit] Remove a few obsolete members in .NET (#14043)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests tvOS (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-tvos\TestSummary.md not found.

Pipeline on Agent
[AppKit] Remove a few obsolete members in .NET (#14043)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests iOS (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-iOS64\TestSummary.md not found.

Pipeline on Agent
[AppKit] Remove a few obsolete members in .NET (#14043)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Tests failed on macOS Mac Catalina (10.15) ❌

Tests failed on Mac Catalina (10.15).

Failed tests are:

  • introspection

Pipeline on Agent
[AppKit] Remove a few obsolete members in .NET (#14043)

Please sign in to comment.