[homekit] Add nullability to (generated and manual) bindings - #15111
Conversation
| var constant = significantEvent.GetConstant (); | ||
| if (constant is null) | ||
| ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (significantEvent)); | ||
| return CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (constant, offset); |
There was a problem hiding this comment.
This method and CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent below both eventually throw an ArgumentNullException so we could ! the significantEvent.GetConstant () and just pass it on but I thought this may be better. Opinions welcome!
| return GetServices (arr.ToArray ()); | ||
| } | ||
|
|
||
| class ServiceTypeList<T> : List<T> { |
There was a problem hiding this comment.
This saves a ton of null checks above from lines 17 - 80, but this may be hiding the null check. Opinions?
This comment has been minimized.
This comment has been minimized.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Hmm the legacy xtro tests are failing here, but they pass locally? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
❌ [PR Build] Tests on macOS Mac Catalina (10.15) failed ❌Failed tests are:
Pipeline on Agent |
📋 [PR Build] API Diff 📋API diff (for current PR)ℹ️ API Diff (from PR only) (please review changes) .NETXamarin vs .NETAPI diff (vs stable)✅ API Diff from stable .NETXamarin vs .NETGenerator diffℹ️ Generator Diff (please review changes) Pipeline on Agent XAMBOT-1108.Monterey' |
💻 [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 |
|
Unrelated Test Failures: https://github.com/xamarin/maccore/issues/2558 |

This PR aims to bring nullability changes to HomeKit.
Following the steps here:
!missing-null-allowed!in this frameworks ignore files and applying themnullable enableto all manual files that are not "API_SOURCES" in src/frameworks.sources and making the required nullability changes== nullor!= nulltois nullandis not null