Skip to content

[generator] Fix warnings in api definitions. - #16729

Merged
rolfbjarne merged 4 commits into
dotnet:mainfrom
rolfbjarne:apidefs-warnings
Nov 16, 2022
Merged

[generator] Fix warnings in api definitions.#16729
rolfbjarne merged 4 commits into
dotnet:mainfrom
rolfbjarne:apidefs-warnings

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Nov 11, 2022

Copy link
Copy Markdown
Member

Fixes these warnings:

appkit.cs(13128,8): warning CS0108: 'NSResponder.RestoreUserActivityState(NSUserActivity)' hides inherited member 'NSUserActivityRestoring.RestoreUserActivityState(NSUserActivity)'. Use the new keyword if hiding was intended.
appkit.cs(19500,12): warning CS0109: The member 'NSTextView.Editable' does not hide an accessible member. The new keyword is not required.
appkit.cs(19503,12): warning CS0109: The member 'NSTextView.Selectable' does not hide an accessible member. The new keyword is not required.
appkit.cs(27481,14): warning CS0108: 'NSFontAssetRequest.Progress' hides inherited member 'NSProgressReporting.Progress'. Use the new keyword if hiding was intended.
appkit.cs(5342,8): warning CS0108: 'NSController.DiscardEditing()' hides inherited member 'NSEditor.DiscardEditing()'. Use the new keyword if hiding was intended.
appkit.cs(5346,8): warning CS0108: 'NSController.CommitEditing(NSObject, Selector, nint)' hides inherited member 'NSEditor.CommitEditing(NSObject, Selector, nint)'. Use the new keyword if hiding was intended.
appkit.cs(5353,8): warning CS0108: 'NSController.ObjectDidBeginEditing(INSEditor)' hides inherited member 'NSEditorRegistration.ObjectDidBeginEditing(INSEditor)'. Use the new keyword if hiding was intended.
appkit.cs(5356,8): warning CS0108: 'NSController.ObjectDidEndEditing(INSEditor)' hides inherited member 'NSEditorRegistration.ObjectDidEndEditing(INSEditor)'. Use the new keyword if hiding was intended.
appkit.cs(5367,8): warning CS0108: 'NSController.CommitEditing()' hides inherited member 'NSEditor.CommitEditing()'. Use the new keyword if hiding was intended.
appkit.cs(5974,8): warning CS0108: 'NSDocument.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)' hides inherited member 'NSUserInterfaceValidations.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)'. Use the new keyword if hiding was intended.
appkit.cs(6113,8): warning CS0108: 'NSDocument.RestoreUserActivityState(NSUserActivity)' hides inherited member 'NSUserActivityRestoring.RestoreUserActivityState(NSUserActivity)'. Use the new keyword if hiding was intended.
appkit.cs(6260,8): warning CS0108: 'NSDocumentController.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)' hides inherited member 'NSUserInterfaceValidations.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)'. Use the new keyword if hiding was intended.
avfoundation.cs(4928,3): warning CS0618: 'AVSampleCursorSyncInfo' is obsolete: 'This API is not available on this platform.'
avfoundation.cs(4931,3): warning CS0618: 'AVSampleCursorSyncInfo' is obsolete: 'This API is not available on this platform.'
avfoundation.cs(4942,3): warning CS0618: 'AVSampleCursorStorageRange' is obsolete: 'This API is not available on this platform.'
avfoundation.cs(4945,3): warning CS0618: 'AVSampleCursorChunkInfo' is obsolete: 'This API is not available on this platform.'
avfoundation.cs(4951,3): warning CS0618: 'AVSampleCursorStorageRange' is obsolete: 'This API is not available on this platform.'
carplay.cs(1622,8): warning CS0108: 'CPListImageRowItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
carplay.cs(1695,8): warning CS0108: 'CPMessageListItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
carplay.cs(576,8): warning CS0108: 'CPListItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
contacts.cs(1589,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
contacts.cs(1685,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
coredata.cs(1053,12): warning CS0109: The member 'NSManagedObjectContext.Lock()' does not hide an accessible member. The new keyword is not required.
coredata.cs(1059,12): warning CS0109: The member 'NSManagedObjectContext.Unlock()' does not hide an accessible member. The new keyword is not required.
coredata.cs(2066,12): warning CS0109: The member 'NSPersistentStoreCoordinator.Lock()' does not hide an accessible member. The new keyword is not required.
coredata.cs(2072,12): warning CS0109: The member 'NSPersistentStoreCoordinator.Unlock()' does not hide an accessible member. The new keyword is not required.
coreimage.cs(1731,88): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
coreimage.cs(1798,81): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
foundation.cs(459,21): error CS0246: The type or namespace name 'NSTextBlock' could not be found (are you missing a using directive or an assembly reference?)
foundation.cs(463,21): error CS0246: The type or namespace name 'NSTextTable' could not be found (are you missing a using directive or an assembly reference?)
gamecontroller.cs(2422,13): warning CS0108: 'GCDevicePhysicalInput.Device' hides inherited member 'GCDevicePhysicalInputState.Device'. Use the new keyword if hiding was intended.
healthkit.cs(4208,237): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
healthkit.cs(4208,247): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
mapkit.cs(1892,12): warning CS0109: The member 'MKTileOverlay.CanReplaceMapContent' does not hide an accessible member. The new keyword is not required.
metal.cs(1627,3): warning CS0618: 'MTLAccelerationStructureSizes' is obsolete: 'This API is not available on this platform.'
notificationcenter.cs(82,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
PassKit/PKEnums.cs(193,11): warning CS0618: 'PKPaymentButtonType.Checkout' is obsolete: 'Use 'Checkout2'.'
PassKit/PKEnums.cs(195,15): warning CS0618: 'PKPaymentButtonType.Book' is obsolete: 'Use 'Book2'.'
pdfkit.cs(1454,76): warning CS0618: 'PdfPrintScalingMode' is obsolete: 'This type is not available on iOS.'
pdfkit.cs(2020,53): warning CS0618: 'PdfPrintScalingMode' is obsolete: 'This type is not available on iOS.'
scenekit.cs(1973,87): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
sharedwithyou.cs(372,9): warning CS0108: 'SWHighlightChangeEvent.HighlightUrl' hides inherited member 'SWHighlightEvent.HighlightUrl'. Use the new keyword if hiding was intended.
soundanalysis.cs(207,4): warning CS0657: 'return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'property'. All attributes in this block will be ignored.
uikit.cs(11490,44): warning CS0109: The member 'UIResponder.ActivityItemsConfiguration' does not hide an accessible member. The new keyword is not required.
uikit.cs(11505,18): warning CS0109: The member 'UIResponder.TouchBar' does not hide an accessible member. The new keyword is not required.
uikit.cs(11509,14): warning CS0108: 'UIResponder.TouchBar' hides inherited member 'NSTouchBarProvider.TouchBar'. Use the new keyword if hiding was intended.
uikit.cs(292,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
usernotifications.cs(197,13): warning CS0618: 'UNNotificationInterruptionLevel.Critical' is obsolete: 'Use 'Critical2'.'
usernotifications.cs(198,15): warning CS0618: 'UNNotificationInterruptionLevel.TimeSensitive' is obsolete: 'Use 'TimeSensitive2'.'
usernotifications.cs(199,14): warning CS0618: 'UNNotificationInterruptionLevel.Active' is obsolete: 'Use 'Active2'.'
usernotifications.cs(200,20): warning CS0618: 'UNNotificationInterruptionLevel.Passive' is obsolete: 'Use 'Passive2'.'
xkit.cs(2068,15): warning CS0109: The member 'NSCollectionLayoutVisibleItem.Center' does not hide an accessible member. The new keyword is not required.
xkit.cs(2073,14): warning CS0109: The member 'NSCollectionLayoutVisibleItem.Bounds' does not hide an accessible member. The new keyword is not required.

rolfbjarne and others added 2 commits November 11, 2022 18:30
	appkit.cs(13128,8): warning CS0108: 'NSResponder.RestoreUserActivityState(NSUserActivity)' hides inherited member 'NSUserActivityRestoring.RestoreUserActivityState(NSUserActivity)'. Use the new keyword if hiding was intended.
	appkit.cs(19500,12): warning CS0109: The member 'NSTextView.Editable' does not hide an accessible member. The new keyword is not required.
	appkit.cs(19503,12): warning CS0109: The member 'NSTextView.Selectable' does not hide an accessible member. The new keyword is not required.
	appkit.cs(27481,14): warning CS0108: 'NSFontAssetRequest.Progress' hides inherited member 'NSProgressReporting.Progress'. Use the new keyword if hiding was intended.
	appkit.cs(5342,8): warning CS0108: 'NSController.DiscardEditing()' hides inherited member 'NSEditor.DiscardEditing()'. Use the new keyword if hiding was intended.
	appkit.cs(5346,8): warning CS0108: 'NSController.CommitEditing(NSObject, Selector, nint)' hides inherited member 'NSEditor.CommitEditing(NSObject, Selector, nint)'. Use the new keyword if hiding was intended.
	appkit.cs(5353,8): warning CS0108: 'NSController.ObjectDidBeginEditing(INSEditor)' hides inherited member 'NSEditorRegistration.ObjectDidBeginEditing(INSEditor)'. Use the new keyword if hiding was intended.
	appkit.cs(5356,8): warning CS0108: 'NSController.ObjectDidEndEditing(INSEditor)' hides inherited member 'NSEditorRegistration.ObjectDidEndEditing(INSEditor)'. Use the new keyword if hiding was intended.
	appkit.cs(5367,8): warning CS0108: 'NSController.CommitEditing()' hides inherited member 'NSEditor.CommitEditing()'. Use the new keyword if hiding was intended.
	appkit.cs(5974,8): warning CS0108: 'NSDocument.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)' hides inherited member 'NSUserInterfaceValidations.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)'. Use the new keyword if hiding was intended.
	appkit.cs(6113,8): warning CS0108: 'NSDocument.RestoreUserActivityState(NSUserActivity)' hides inherited member 'NSUserActivityRestoring.RestoreUserActivityState(NSUserActivity)'. Use the new keyword if hiding was intended.
	appkit.cs(6260,8): warning CS0108: 'NSDocumentController.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)' hides inherited member 'NSUserInterfaceValidations.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)'. Use the new keyword if hiding was intended.
	avfoundation.cs(4928,3): warning CS0618: 'AVSampleCursorSyncInfo' is obsolete: 'This API is not available on this platform.'
	avfoundation.cs(4931,3): warning CS0618: 'AVSampleCursorSyncInfo' is obsolete: 'This API is not available on this platform.'
	avfoundation.cs(4942,3): warning CS0618: 'AVSampleCursorStorageRange' is obsolete: 'This API is not available on this platform.'
	avfoundation.cs(4945,3): warning CS0618: 'AVSampleCursorChunkInfo' is obsolete: 'This API is not available on this platform.'
	avfoundation.cs(4951,3): warning CS0618: 'AVSampleCursorStorageRange' is obsolete: 'This API is not available on this platform.'
	carplay.cs(1622,8): warning CS0108: 'CPListImageRowItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
	carplay.cs(1695,8): warning CS0108: 'CPMessageListItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
	carplay.cs(576,8): warning CS0108: 'CPListItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
	contacts.cs(1589,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
	contacts.cs(1685,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
	coredata.cs(1053,12): warning CS0109: The member 'NSManagedObjectContext.Lock()' does not hide an accessible member. The new keyword is not required.
	coredata.cs(1059,12): warning CS0109: The member 'NSManagedObjectContext.Unlock()' does not hide an accessible member. The new keyword is not required.
	coredata.cs(2066,12): warning CS0109: The member 'NSPersistentStoreCoordinator.Lock()' does not hide an accessible member. The new keyword is not required.
	coredata.cs(2072,12): warning CS0109: The member 'NSPersistentStoreCoordinator.Unlock()' does not hide an accessible member. The new keyword is not required.
	coreimage.cs(1731,88): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	coreimage.cs(1798,81): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	foundation.cs(459,21): error CS0246: The type or namespace name 'NSTextBlock' could not be found (are you missing a using directive or an assembly reference?)
	foundation.cs(463,21): error CS0246: The type or namespace name 'NSTextTable' could not be found (are you missing a using directive or an assembly reference?)
	gamecontroller.cs(2422,13): warning CS0108: 'GCDevicePhysicalInput.Device' hides inherited member 'GCDevicePhysicalInputState.Device'. Use the new keyword if hiding was intended.
	healthkit.cs(4208,237): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	healthkit.cs(4208,247): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	mapkit.cs(1892,12): warning CS0109: The member 'MKTileOverlay.CanReplaceMapContent' does not hide an accessible member. The new keyword is not required.
	metal.cs(1627,3): warning CS0618: 'MTLAccelerationStructureSizes' is obsolete: 'This API is not available on this platform.'
	notificationcenter.cs(82,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
	PassKit/PKEnums.cs(193,11): warning CS0618: 'PKPaymentButtonType.Checkout' is obsolete: 'Use 'Checkout2'.'
	PassKit/PKEnums.cs(195,15): warning CS0618: 'PKPaymentButtonType.Book' is obsolete: 'Use 'Book2'.'
	pdfkit.cs(1454,76): warning CS0618: 'PdfPrintScalingMode' is obsolete: 'This type is not available on iOS.'
	pdfkit.cs(2020,53): warning CS0618: 'PdfPrintScalingMode' is obsolete: 'This type is not available on iOS.'
	scenekit.cs(1973,87): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	sharedwithyou.cs(372,9): warning CS0108: 'SWHighlightChangeEvent.HighlightUrl' hides inherited member 'SWHighlightEvent.HighlightUrl'. Use the new keyword if hiding was intended.
	soundanalysis.cs(207,4): warning CS0657: 'return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'property'. All attributes in this block will be ignored.
	uikit.cs(11490,44): warning CS0109: The member 'UIResponder.ActivityItemsConfiguration' does not hide an accessible member. The new keyword is not required.
	uikit.cs(11505,18): warning CS0109: The member 'UIResponder.TouchBar' does not hide an accessible member. The new keyword is not required.
	uikit.cs(11509,14): warning CS0108: 'UIResponder.TouchBar' hides inherited member 'NSTouchBarProvider.TouchBar'. Use the new keyword if hiding was intended.
	uikit.cs(292,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
	usernotifications.cs(197,13): warning CS0618: 'UNNotificationInterruptionLevel.Critical' is obsolete: 'Use 'Critical2'.'
	usernotifications.cs(198,15): warning CS0618: 'UNNotificationInterruptionLevel.TimeSensitive' is obsolete: 'Use 'TimeSensitive2'.'
	usernotifications.cs(199,14): warning CS0618: 'UNNotificationInterruptionLevel.Active' is obsolete: 'Use 'Active2'.'
	usernotifications.cs(200,20): warning CS0618: 'UNNotificationInterruptionLevel.Passive' is obsolete: 'Use 'Passive2'.'
	xkit.cs(2068,15): warning CS0109: The member 'NSCollectionLayoutVisibleItem.Center' does not hide an accessible member. The new keyword is not required.
	xkit.cs(2073,14): warning CS0109: The member 'NSCollectionLayoutVisibleItem.Bounds' does not hide an accessible member. The new keyword is not required.
@github-actions

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS (no change detected)
NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

❗ 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: 8a6f7ace3a966ff341b177f2f7cf4e08ae42e818 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-011.Monterey'
Hash: 8a6f7ace3a966ff341b177f2f7cf4e08ae42e818 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: 8a6f7ace3a966ff341b177f2f7cf4e08ae42e818 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 5 tests failed, 218 tests passed.

Failures

❌ bcl tests [attempt 2]

5 tests failed, 64 tests passed.
Details
  • [NUnit] Mono Mac OS X BCL tests group 3/Mac Full/Debug: Failed (Test run failed.
    Tests run: 11328 Passed: 10552 Inconclusive: 0 Failed: 1 Ignored: 98)
  • [NUnit] Mono Mac OS X BCL tests group 3/Mac Modern/Debug: Failed (Test run failed.
    Tests run: 8755 Passed: 8174 Inconclusive: 0 Failed: 1 Ignored: 46)
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - simulator/Debug: Failed
  • [NUnit] Mono BCL tests group 2/tvOS - simulator/Debug: Failed
  • [NUnit] Mono CorlibTests/watchOS 32-bits - simulator/Debug: Failed

Html Report (VSDrops) Download

Successes

✅ 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. [attempt 2] Html Report (VSDrops) Download
✅ introspection: All 8 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 12 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 23 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [PR build]

@rolfbjarne

Copy link
Copy Markdown
Member Author

Test failures are unrelated (https://github.com/xamarin/maccore/issues/2629).

@rolfbjarne
rolfbjarne marked this pull request as ready for review November 15, 2022 16:02
@rolfbjarne
rolfbjarne merged commit 07aeb79 into dotnet:main Nov 16, 2022
@rolfbjarne
rolfbjarne deleted the apidefs-warnings branch November 16, 2022 06:55
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.

4 participants