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

Introspection fails on macOS 10.9 in xcode12.2 #10009

Closed
rolfbjarne opened this issue Oct 30, 2020 · 1 comment
Closed

Introspection fails on macOS 10.9 in xcode12.2 #10009

rolfbjarne opened this issue Oct 30, 2020 · 1 comment
Assignees
Labels
bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS
Milestone

Comments

@rolfbjarne
Copy link
Member

Failures:

1) ApiSelectorTest.InstanceMethods (Introspection.MacApiSelectorTest.ApiSelectorTest.InstanceMethods)
     156 errors found in 13876 instance selector validated:
Selector not found for AppKit.NSApplication : accessibilityPerformCancel
Selector not found for AppKit.NSApplication : accessibilityPerformConfirm
Selector not found for AppKit.NSApplication : accessibilityPerformDecrement
Selector not found for AppKit.NSApplication : accessibilityPerformDelete
Selector not found for AppKit.NSApplication : accessibilityPerformIncrement
Selector not found for AppKit.NSApplication : accessibilityPerformPick
Selector not found for AppKit.NSApplication : accessibilityPerformPress
Selector not found for AppKit.NSApplication : accessibilityPerformRaise
Selector not found for AppKit.NSApplication : accessibilityPerformShowAlternateUI
Selector not found for AppKit.NSApplication : accessibilityPerformShowDefaultUI
Selector not found for AppKit.NSApplication : accessibilityPerformShowMenu
Selector not found for AppKit.NSApplication : accessibilityAttributedStringForRange:
Selector not found for AppKit.NSApplication : accessibilityCellForColumn:row:
Selector not found for AppKit.NSApplication : accessibilityFrameForRange:
Selector not found for AppKit.NSApplication : accessibilityLayoutPointForScreenPoint:
Selector not found for AppKit.NSApplication : accessibilityLayoutSizeForScreenSize:
Selector not found for AppKit.NSApplication : accessibilityLineForIndex:
Selector not found for AppKit.NSApplication : accessibilityRangeForPosition:
Selector not found for AppKit.NSApplication : accessibilityRangeForIndex:
Selector not found for AppKit.NSApplication : accessibilityRangeForLine:
Selector not found for AppKit.NSApplication : accessibilityRTFForRange:
Selector not found for AppKit.NSApplication : accessibilityScreenPointForLayoutPoint:
Selector not found for AppKit.NSApplication : accessibilityScreenSizeForLayoutSize:
Selector not found for AppKit.NSApplication : accessibilityStringForRange:
Selector not found for AppKit.NSApplication : accessibilityStyleRangeForIndex:
Selector not found for AppKit.NSApplication : isAccessibilitySelectorAllowed:
Selector not found for AppKit.NSCell : accessibilityPerformCancel
Selector not found for AppKit.NSCell : accessibilityPerformConfirm
Selector not found for AppKit.NSCell : accessibilityPerformDecrement
Selector not found for AppKit.NSCell : accessibilityPerformDelete
Selector not found for AppKit.NSCell : accessibilityPerformIncrement
Selector not found for AppKit.NSCell : accessibilityPerformPick
Selector not found for AppKit.NSCell : accessibilityPerformPress
Selector not found for AppKit.NSCell : accessibilityPerformRaise
Selector not found for AppKit.NSCell : accessibilityPerformShowAlternateUI
Selector not found for AppKit.NSCell : accessibilityPerformShowDefaultUI
Selector not found for AppKit.NSCell : accessibilityPerformShowMenu
Selector not found for AppKit.NSCell : accessibilityAttributedStringForRange:
Selector not found for AppKit.NSCell : accessibilityCellForColumn:row:
Selector not found for AppKit.NSCell : accessibilityFrameForRange:
Selector not found for AppKit.NSCell : accessibilityLayoutPointForScreenPoint:
Selector not found for AppKit.NSCell : accessibilityLayoutSizeForScreenSize:
Selector not found for AppKit.NSCell : accessibilityLineForIndex:
Selector not found for AppKit.NSCell : accessibilityRangeForPosition:
Selector not found for AppKit.NSCell : accessibilityRangeForIndex:
Selector not found for AppKit.NSCell : accessibilityRangeForLine:
Selector not found for AppKit.NSCell : accessibilityRTFForRange:
Selector not found for AppKit.NSCell : accessibilityScreenPointForLayoutPoint:
Selector not found for AppKit.NSCell : accessibilityScreenSizeForLayoutSize:
Selector not found for AppKit.NSCell : accessibilityStringForRange:
Selector not found for AppKit.NSCell : accessibilityStyleRangeForIndex:
Selector not found for AppKit.NSCell : isAccessibilitySelectorAllowed:
Selector not found for AppKit.NSWindow : accessibilityPerformCancel
Selector not found for AppKit.NSWindow : accessibilityPerformConfirm
Selector not found for AppKit.NSWindow : accessibilityPerformDecrement
Selector not found for AppKit.NSWindow : accessibilityPerformDelete
Selector not found for AppKit.NSWindow : accessibilityPerformIncrement
Selector not found for AppKit.NSWindow : accessibilityPerformPick
Selector not found for AppKit.NSWindow : accessibilityPerformPress
Selector not found for AppKit.NSWindow : accessibilityPerformRaise
Selector not found for AppKit.NSWindow : accessibilityPerformShowAlternateUI
Selector not found for AppKit.NSWindow : accessibilityPerformShowDefaultUI
Selector not found for AppKit.NSWindow : accessibilityPerformShowMenu
Selector not found for AppKit.NSWindow : accessibilityAttributedStringForRange:
Selector not found for AppKit.NSWindow : accessibilityCellForColumn:row:
Selector not found for AppKit.NSWindow : accessibilityFrameForRange:
Selector not found for AppKit.NSWindow : accessibilityLayoutPointForScreenPoint:
Selector not found for AppKit.NSWindow : accessibilityLayoutSizeForScreenSize:
Selector not found for AppKit.NSWindow : accessibilityLineForIndex:
Selector not found for AppKit.NSWindow : accessibilityRangeForPosition:
Selector not found for AppKit.NSWindow : accessibilityRangeForIndex:
Selector not found for AppKit.NSWindow : accessibilityRangeForLine:
Selector not found for AppKit.NSWindow : accessibilityRTFForRange:
Selector not found for AppKit.NSWindow : accessibilityScreenPointForLayoutPoint:
Selector not found for AppKit.NSWindow : accessibilityScreenSizeForLayoutSize:
Selector not found for AppKit.NSWindow : accessibilityStringForRange:
Selector not found for AppKit.NSWindow : accessibilityStyleRangeForIndex:
Selector not found for AppKit.NSWindow : isAccessibilitySelectorAllowed:
Selector not found for AppKit.NSView : accessibilityPerformCancel
Selector not found for AppKit.NSView : accessibilityPerformConfirm
Selector not found for AppKit.NSView : accessibilityPerformDecrement
Selector not found for AppKit.NSView : accessibilityPerformDelete
Selector not found for AppKit.NSView : accessibilityPerformIncrement
Selector not found for AppKit.NSView : accessibilityPerformPick
Selector not found for AppKit.NSView : accessibilityPerformPress
Selector not found for AppKit.NSView : accessibilityPerformRaise
Selector not found for AppKit.NSView : accessibilityPerformShowAlternateUI
Selector not found for AppKit.NSView : accessibilityPerformShowDefaultUI
Selector not found for AppKit.NSView : accessibilityPerformShowMenu
Selector not found for AppKit.NSView : accessibilityAttributedStringForRange:
Selector not found for AppKit.NSView : accessibilityCellForColumn:row:
Selector not found for AppKit.NSView : accessibilityFrameForRange:
Selector not found for AppKit.NSView : accessibilityLayoutPointForScreenPoint:
Selector not found for AppKit.NSView : accessibilityLayoutSizeForScreenSize:
Selector not found for AppKit.NSView : accessibilityLineForIndex:
Selector not found for AppKit.NSView : accessibilityRangeForPosition:
Selector not found for AppKit.NSView : accessibilityRangeForIndex:
Selector not found for AppKit.NSView : accessibilityRangeForLine:
Selector not found for AppKit.NSView : accessibilityRTFForRange:
Selector not found for AppKit.NSView : accessibilityScreenPointForLayoutPoint:
Selector not found for AppKit.NSView : accessibilityScreenSizeForLayoutSize:
Selector not found for AppKit.NSView : accessibilityStringForRange:
Selector not found for AppKit.NSView : accessibilityStyleRangeForIndex:
Selector not found for AppKit.NSView : isAccessibilitySelectorAllowed:
Selector not found for AppKit.NSDrawer : accessibilityPerformCancel
Selector not found for AppKit.NSDrawer : accessibilityPerformConfirm
Selector not found for AppKit.NSDrawer : accessibilityPerformDecrement
Selector not found for AppKit.NSDrawer : accessibilityPerformDelete
Selector not found for AppKit.NSDrawer : accessibilityPerformIncrement
Selector not found for AppKit.NSDrawer : accessibilityPerformPick
Selector not found for AppKit.NSDrawer : accessibilityPerformPress
Selector not found for AppKit.NSDrawer : accessibilityPerformRaise
Selector not found for AppKit.NSDrawer : accessibilityPerformShowAlternateUI
Selector not found for AppKit.NSDrawer : accessibilityPerformShowDefaultUI
Selector not found for AppKit.NSDrawer : accessibilityPerformShowMenu
Selector not found for AppKit.NSDrawer : accessibilityAttributedStringForRange:
Selector not found for AppKit.NSDrawer : accessibilityCellForColumn:row:
Selector not found for AppKit.NSDrawer : accessibilityFrameForRange:
Selector not found for AppKit.NSDrawer : accessibilityLayoutPointForScreenPoint:
Selector not found for AppKit.NSDrawer : accessibilityLayoutSizeForScreenSize:
Selector not found for AppKit.NSDrawer : accessibilityLineForIndex:
Selector not found for AppKit.NSDrawer : accessibilityRangeForPosition:
Selector not found for AppKit.NSDrawer : accessibilityRangeForIndex:
Selector not found for AppKit.NSDrawer : accessibilityRangeForLine:
Selector not found for AppKit.NSDrawer : accessibilityRTFForRange:
Selector not found for AppKit.NSDrawer : accessibilityScreenPointForLayoutPoint:
Selector not found for AppKit.NSDrawer : accessibilityScreenSizeForLayoutSize:
Selector not found for AppKit.NSDrawer : accessibilityStringForRange:
Selector not found for AppKit.NSDrawer : accessibilityStyleRangeForIndex:
Selector not found for AppKit.NSDrawer : isAccessibilitySelectorAllowed:
Selector not found for AppKit.NSPopover : accessibilityPerformCancel
Selector not found for AppKit.NSPopover : accessibilityPerformConfirm
Selector not found for AppKit.NSPopover : accessibilityPerformDecrement
Selector not found for AppKit.NSPopover : accessibilityPerformDelete
Selector not found for AppKit.NSPopover : accessibilityPerformIncrement
Selector not found for AppKit.NSPopover : accessibilityPerformPick
Selector not found for AppKit.NSPopover : accessibilityPerformPress
Selector not found for AppKit.NSPopover : accessibilityPerformRaise
Selector not found for AppKit.NSPopover : accessibilityPerformShowAlternateUI
Selector not found for AppKit.NSPopover : accessibilityPerformShowDefaultUI
Selector not found for AppKit.NSPopover : accessibilityPerformShowMenu
Selector not found for AppKit.NSPopover : accessibilityAttributedStringForRange:
Selector not found for AppKit.NSPopover : accessibilityCellForColumn:row:
Selector not found for AppKit.NSPopover : accessibilityFrameForRange:
Selector not found for AppKit.NSPopover : accessibilityLayoutPointForScreenPoint:
Selector not found for AppKit.NSPopover : accessibilityLayoutSizeForScreenSize:
Selector not found for AppKit.NSPopover : accessibilityLineForIndex:
Selector not found for AppKit.NSPopover : accessibilityRangeForPosition:
Selector not found for AppKit.NSPopover : accessibilityRangeForIndex:
Selector not found for AppKit.NSPopover : accessibilityRangeForLine:
Selector not found for AppKit.NSPopover : accessibilityRTFForRange:
Selector not found for AppKit.NSPopover : accessibilityScreenPointForLayoutPoint:
Selector not found for AppKit.NSPopover : accessibilityScreenSizeForLayoutSize:
Selector not found for AppKit.NSPopover : accessibilityStringForRange:
Selector not found for AppKit.NSPopover : accessibilityStyleRangeForIndex:
Selector not found for AppKit.NSPopover : isAccessibilitySelectorAllowed:

  Expected: 0
  But was:  156

  at Introspection.ApiSelectorTest.InstanceMethods () [0x00106] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiSelectorTest.cs:905 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395 

See: https://jenkins.internalx.com/blue/organizations/jenkins/macios/detail/PR-10006/1/pipeline/204#step-494-log-379

@rolfbjarne rolfbjarne added bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS labels Oct 30, 2020
@rolfbjarne rolfbjarne added this to the xcode12.2 milestone Oct 30, 2020
@spouliot spouliot self-assigned this Oct 30, 2020
@spouliot
Copy link
Contributor

It's related to my earlier availability fixes.

It uncovered an old issue where [Protocol] was added on 10.10 on the existing type, NSAccessibility. We should have created a new type, like Swift did (a few years later), NSAccessibilityProtocol.

My first fix split the protocol/type availability by having them in manual (and not generated) code. That fixed the failures on NSAccessibility, but since we inline the protocol inside other type then this information is missing (since it's not in bindings files anymore).

Working a different fix...

spouliot pushed a commit that referenced this issue Oct 30, 2020
This reverts parts of #9993
and add a special case to the test looking for duplicate attributes
between members and the type.

Why ? Introspection fails because `bgen` inline the `NSAccessibility`
protocol (added in 10.10) into types that existed earlier. That's
normally not a problem since the type-level attribute is there.
However because of the 10.9 (type) vs 10.10 (protocol) issue that was
moved into the manual bindings (so `bgen` does not know it)

Even if built inside `COREBUILD` the issue exists since the protocol
interface does not really exists at that point (by default), so it's
the type (10.9) availability that is looked up.

In retrospect we should have created a new type, like Swift did (a
few years later), named `NSAccessibilityProtocol` for 10.10.

Fix #10009
spouliot added a commit that referenced this issue Nov 2, 2020
…10016)

This reverts parts of #9993
and add a special case to the test looking for duplicate attributes
between members and the type.

Why ? Introspection fails because `bgen` inline the `NSAccessibility`
protocol (added in 10.10) into types that existed earlier. That's
normally not a problem since the type-level attribute is there.
However because of the 10.9 (type) vs 10.10 (protocol) issue that was
moved into the manual bindings (so `bgen` does not know it)

Even if built inside `COREBUILD` the issue exists since the protocol
interface does not really exists at that point (by default), so it's
the type (10.9) availability that is looked up.

In retrospect we should have created a new type, like Swift did (a
few years later), named `NSAccessibilityProtocol` for 10.10.

Fix #10009
@spouliot spouliot closed this as completed Nov 2, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS
Projects
None yet
Development

No branches or pull requests

2 participants