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

[AppKit] Add support for Xcode 15. #18762

Conversation

mandel-macaque
Copy link
Member

No description provided.

@github-actions
Copy link
Contributor

⚠️ Your code has been reformatted. ⚠️

If this is not desired, add the actions-disable-autoformat label, and revert the reformatting commit.

If files unrelated to your change were modified, try reverting the reformatting commit + merging with the target branch (and push those changes).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

src/appkit.cs Outdated Show resolved Hide resolved
Copy link
Member

@rolfbjarne rolfbjarne left a comment

Choose a reason for hiding this comment

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

It might also be an idea to do the bindings for UIKit before merging this one, in case there's identical API that should be bound identically.

Comment on lines 215 to 224
[UnsupportedOSPlatform ("ios17.0")]
[UnsupportedOSPlatform ("maccatalyst17.0")]
[UnsupportedOSPlatform ("macos14.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst17.0 will always return null.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios17.0 will always return null.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif MONOMAC
[Obsolete ("Starting with macos14.0 wll always return null.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Use [ObsoletedOSPlatform ("ios17.0", "Starting with ...")] instead of UnsupportedOSPlatform + Obsolete.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like I am outdated

src/coreanimation.cs Show resolved Hide resolved
Comment on lines -4432 to -4437
// This field is really inside WebKit
[NoWatch, NoTV]
[iOS (13, 0)]
[MacCatalyst (13, 1)]
[Field ("NSReadAccessURLDocumentOption", "WebKit")]
NSString NSReadAccessUrlDocumentOption { get; }
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

@mandel-macaque mandel-macaque Aug 18, 2023

Choose a reason for hiding this comment

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

Intro && xtro say the opposite. Should we leave it?

Copy link
Member

Choose a reason for hiding this comment

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

Yea, this is weird, seems like something people would use fairly frequently. I think it's best to leave it in for now.

if (intptrCtor is not null) {
if (intptrCtor is not null && intptrCtor.Name == "init:") {
Copy link
Member

Choose a reason for hiding this comment

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

What failed here to make this necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

The following constructor:

		[Export ("initWithCount:")]
		NativeHandle Constructor (nint itemCount);

Yet now that you mention it, is intptrConstr.Name the selector name, I think I added a big there.

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the code accordingly checking the ExportAttr.


# the method is a static constructor that return a label for a New item, they used New not to represent the intent of the
# method, but what label it returns (probably a new objc developer at apple)
!missing-release-attribute-on-return-value! AppKit.NSMenuItemBadge AppKit.NSMenuItemBadge::CreateNewItems(System.IntPtr)'s selector's ('newItemsWithCount:') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required.
Copy link
Member

Choose a reason for hiding this comment

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

Did you test that the selector in question doesn't return a retained object? AFAIK that's automatic in the Objective-C compiler, so unless Apple's developer did something specific to get a different behavior, we'll get a retained object.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is from someone that did not know about Objc, the Badge it creates is fo "New Items" as opossed to Update Items.. a very poorly chosen API if you consider the objc common practice :/

src/appkit.cs Outdated
@@ -10551,6 +10691,65 @@ interface NSImageView : NSAccessibilityImage, NSMenuItemValidation {
[Mac (11, 0)]
[Export ("symbolConfiguration", ArgumentSemantic.Copy)]
NSImageSymbolConfiguration SymbolConfiguration { get; set; }

// from NSSymbolEffect (NSImageView)
Copy link
Member

Choose a reason for hiding this comment

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

Documentation says NSSymbolEffect is a base class, so why not bind it as such?

https://developer.apple.com/documentation/symbols/nssymboleffect

Copy link
Member Author

Choose a reason for hiding this comment

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

Xtro reports the following:

Looking at xtro we get:

!missing-selector! +NSImageView::defaultPreferredImageDynamicRange not bound
!missing-selector! +NSImageView::setDefaultPreferredImageDynamicRange: not bound
!missing-selector! NSImageView::addSymbolEffect: not bound
!missing-selector! NSImageView::addSymbolEffect:options: not bound
!missing-selector! NSImageView::addSymbolEffect:options:animated: not bound
!missing-selector! NSImageView::imageDynamicRange not bound
!missing-selector! NSImageView::preferredImageDynamicRange not bound
!missing-selector! NSImageView::removeAllSymbolEffects not bound
!missing-selector! NSImageView::removeAllSymbolEffectsWithOptions: not bound
!missing-selector! NSImageView::removeAllSymbolEffectsWithOptions:animated: not bound
!missing-selector! NSImageView::removeSymbolEffectOfType: not bound
!missing-selector! NSImageView::removeSymbolEffectOfType:options: not bound
!missing-selector! NSImageView::removeSymbolEffectOfType:options:animated: not bound
!missing-selector! NSImageView::setPreferredImageDynamicRange: not bound
!missing-selector! NSImageView::setSymbolImage:withContentTransition: not bound
!missing-selector! NSImageView::setSymbolImage:withContentTransition:options: not bound

We are looking at the category on the NSImageView class.

src/appkit.cs Outdated Show resolved Hide resolved
src/appkit.cs Outdated Show resolved Hide resolved
src/appkit.cs Outdated Show resolved Hide resolved
src/appkit.cs Outdated Show resolved Hide resolved
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@github-actions
Copy link
Contributor

⚠️ Your code has been reformatted. ⚠️

If this is not desired, add the actions-disable-autoformat label, and revert the reformatting commit.

If files unrelated to your change were modified, try reverting the reformatting commit + merging with the target branch (and push those changes).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

src/appkit.cs Outdated

[Mac (14, 0)]
[Export ("curveToPoint:controlPoint:")]
void Curve (CGPoint endPoint, CGPoint controlPoint);
Copy link
Contributor

@tj-devel709 tj-devel709 Aug 22, 2023

Choose a reason for hiding this comment

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

Suggested change
void Curve (CGPoint endPoint, CGPoint controlPoint);
void CurveTo (CGPoint endPoint, CGPoint controlPoint);

Maybe verbify - looks like the style from other methods is adding the 'To" after

src/appkit.cs Outdated

[Mac (14, 0)]
[Export ("relativeCurveToPoint:controlPoint:")]
void RelativeCurve (CGPoint endPoint, CGPoint controlPoint);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
void RelativeCurve (CGPoint endPoint, CGPoint controlPoint);
void RelativeCurveTo (CGPoint endPoint, CGPoint controlPoint);

Copy link
Member Author

Choose a reason for hiding this comment

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

This is reverting literally a previos comment added by @rolfbjarne :)

Copy link
Contributor

Choose a reason for hiding this comment

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

In this PR or a different one? I'm not sure if I follow

Copy link
Member Author

Choose a reason for hiding this comment

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

An other PR. But looking at the fact that we already have a ConvertTo, is best to be consistent within the framework. I'll change it back.

src/appkit.cs Outdated
Comment on lines 24708 to 24719
[Mac (14, 0)]
[Abstract]
[Export ("accessibilityUserInputLabels", ArgumentSemantic.Copy)]
string [] AccessibilityUserInputLabels { get; set; }

[Mac (14, 0)]
[Abstract]
[Export ("accessibilityAttributedUserInputLabels", ArgumentSemantic.Copy)]
NSAttributedString [] AccessibilityAttributedUserInputLabels { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it a breaking change to add abstract members to an existing protocol?

Copy link
Member Author

Choose a reason for hiding this comment

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

I missed that, you are correct.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Contributor

@haritha-mohan haritha-mohan left a comment

Choose a reason for hiding this comment

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

after other comments are addressed 👍

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: c773796fb69e4012aaa7be120a4d1d7c08299ce5 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)

❗ 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:)
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: c773796fb69e4012aaa7be120a4d1d7c08299ce5 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 28 tests failed, 209 tests passed.

Failures

❌ monotouch tests

23 tests failed, 15 tests passed.
  • monotouch-test/Mac [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 2775 Passed: 2687 Inconclusive: 3 Failed: 1 Ignored: 87)
  • monotouch-test/Mac [dotnet]/Debug (static registrar) [dotnet]: Failed (Test run failed.
    Tests run: 2772 Passed: 2686 Inconclusive: 3 Failed: 1 Ignored: 85)
  • monotouch-test/Mac [dotnet]/Release [dotnet]: Failed (Test run failed.
    Tests run: 2772 Passed: 2683 Inconclusive: 3 Failed: 1 Ignored: 88)
  • monotouch-test/Mac [dotnet]/Release (all optimizations) [dotnet]: Failed (Test run failed.
    Tests run: 2772 Passed: 2686 Inconclusive: 3 Failed: 1 Ignored: 85)
  • monotouch-test/Mac [dotnet]/Debug (managed static registrar) [dotnet]: Failed (Test run failed.
    Tests run: 2772 Passed: 2686 Inconclusive: 3 Failed: 1 Ignored: 85)
  • monotouch-test/Mac [dotnet]/Release (managed static registrar, all optimizations) [dotnet]: Failed (Test run failed.
    Tests run: 2772 Passed: 2686 Inconclusive: 3 Failed: 1 Ignored: 85)
  • monotouch-test/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 2887 Passed: 2770 Inconclusive: 9 Failed: 1 Ignored: 116)
  • monotouch-test/Mac Catalyst [dotnet]/Release [dotnet]: Failed (Test run failed.
    Tests run: 2884 Passed: 2761 Inconclusive: 9 Failed: 1 Ignored: 122)
  • monotouch-test/Mac Catalyst [dotnet]/Release (NativeAOT, x64) [dotnet]: Failed (Test run failed.
    Tests run: 2884 Passed: 2753 Inconclusive: 9 Failed: 1 Ignored: 130)
  • monotouch-test/Mac Catalyst [dotnet]/Release (all optimizations) [dotnet]: Failed (Test run failed.
    Tests run: 2884 Passed: 2699 Inconclusive: 9 Failed: 1 Ignored: 184)
  • monotouch-test/Mac Catalyst [dotnet]/Debug (managed static registrar) [dotnet]: Failed (Test run failed.
    Tests run: 2884 Passed: 2768 Inconclusive: 9 Failed: 1 Ignored: 115)
  • monotouch-test/Mac Catalyst [dotnet]/Release (managed static registrar, all optimizations) [dotnet]: Failed (Test run failed.
    Tests run: 2884 Passed: 2757 Inconclusive: 9 Failed: 1 Ignored: 126)
  • monotouch-test/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (managed static registrar) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (managed static registrar, all optimizations) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (NativeAOT, x64) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): Failed

Html Report (VSDrops) Download

❌ xammac tests

3 tests failed, 0 tests passed.
  • xammac tests/Mac Modern/Debug: Failed (Test run failed.
    Tests run: 2846 Passed: 2752 Inconclusive: 8 Failed: 1 Ignored: 93)
  • xammac tests/Mac Modern/Release: Failed (Test run failed.
    Tests run: 2843 Passed: 2748 Inconclusive: 8 Failed: 1 Ignored: 94)
  • xammac tests/Mac Modern/Release (all optimizations): Failed (Test run failed.
    Tests run: 2843 Passed: 2750 Inconclusive: 8 Failed: 1 Ignored: 92)

Html Report (VSDrops) Download

❌ xtro tests

2 tests failed, 0 tests passed.
  • Xtro/Legacy Xamarin: BuildFailure
  • Xtro/.NET: BuildFailure

Html Report (VSDrops) Download

Successes

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 13 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 6 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: c773796fb69e4012aaa7be120a4d1d7c08299ce5 [PR build]

@mandel-macaque mandel-macaque changed the title [AppKit] Add support for Xcode 15 up to beta 6. [AppKit] Add support for Xcode 15. Oct 2, 2023
@mandel-macaque
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants