-
Notifications
You must be signed in to change notification settings - Fork 522
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
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
@@ -80,6 +82,16 @@ public partial class HMHome | |||
return GetServices (arr.ToArray ()); | |||
} | |||
|
|||
class ServiceTypeList<T> : List<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 enable
to all manual files that are not "API_SOURCES" in src/frameworks.sources and making the required nullability changes== null
or!= null
tois null
andis not null