-
Notifications
You must be signed in to change notification settings - Fork 516
Nullability
TJ Lambert edited this page Feb 14, 2022
·
2 revisions
- ASAP - there’s nothing blocking us
- the generator handle them using
[NullAllowed]
attributes - xtro report warnings for missing and extra null allowed, based on ObjC headers
-
important: headers are not always 100% accurate so it’s worth checking:
- git history if we allowed it (and headers disagree) and
- if we have unit tests for the API (that prove it works)
-
important: headers are not always 100% accurate so it’s worth checking:
- For each framework then xtro entries must all be fixed before starting on the manual bindings
- because doing binding files later would introduce issues (and re-work)
- Quick-check (for ARKit, empty result means it’s complete)
cd tests/xtro-sharpie
git grep null-allowed *.ignore | grep ARKit
- For all
.cs
files- should have
#nullable enable
- quick check
git grep -L "#nullable enable" .
inside framework directory, e.g.src/ARKit
. No output means every file has the pragma directive
- quick check
- should have
- build without errors
-
warnaserror
is enabled for nullability (somake
is all that should be needed)
-
- Use
ObjCRuntime.ThrowHelper.Throw``**ArgumentNullException**
instead of directly throwing- it’s a size saving optimization - but it also shows we reviewed the code for nullability
- quick check:
git grep " ArgumentNullException" .
inside framework directory, e.g.ARKit
. No output means nothing throw anArgumentNullException
manually (without the helper)
- Replace
== null
and!= null
with the neweris null
andis not null
to avoid using any == or != overrides.
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status