[src] Correct NSApplication nullability Fixes #26449 - #26464
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the AppKit binding definitions to correctly model nullable AppKit APIs (primarily on NSApplication and NSDockTile) by adding [NullAllowed] / [return: NullAllowed] annotations, and removes the corresponding resolved xtro-sharpie ignore entries.
Changes:
- Add
[NullAllowed]/[return: NullAllowed]annotations toNSApplicationmembers whose AppKit counterparts accept/returnnil. - Allow
nullassignment forNSApplication.ApplicationIconImageandNSDockTile.ContentViewvia updated binding nullability. - Remove now-resolved
!missing-null-allowed!entries from the macOS AppKit xtro ignore file.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/appkit.cs |
Adds missing nullability annotations to AppKit bindings (including the reported ApplicationIconImage / NSDockTile.ContentView null setters). |
tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore |
Removes xtro-sharpie ignore entries that should be resolved by the updated binding nullability. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
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.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 919b9b34-af19-4e7d-8b96-102dfa9be80f
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.
CS0657: 'return' is not a valid attribute location for a property; use [NullAllowed] instead of [return: NullAllowed] on MainWindow, KeyWindow, ModalWindow, and CurrentEvent. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 919b9b34-af19-4e7d-8b96-102dfa9be80f
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🔥 [CI Build #901c3ab] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 0 tests failed, 186 tests passed. Failures❌ monotouch tests (tvOS)🔥 Failed catastrophically on VSTS: test results - monotouch_tvos (no summary found). Html Report (VSDrops) Download Successes✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Add the missing [NullAllowed] annotations to NSApplication members whose AppKit declarations accept nullable values or return nullable objects.
Remove the corresponding resolved xtro-sharpie ignores.
Fixes #26449
🤖 Pull request created by Copilot