Skip to content

Comments

[ObjCRuntime] Enable nullability and clean up Stret.#24732

Merged
rolfbjarne merged 3 commits intomainfrom
dev/rolf/objcruntime-nullability-stret-03
Feb 19, 2026
Merged

[ObjCRuntime] Enable nullability and clean up Stret.#24732
rolfbjarne merged 3 commits intomainfrom
dev/rolf/objcruntime-nullability-stret-03

Conversation

@rolfbjarne
Copy link
Member

This is file 3 of 7 files with nullability disabled in ObjCRuntime.

  • Enable nullability (#nullable enable).
  • Add null argument validation for stret helpers to improve static analysis and runtime diagnostics.
  • Add nullable-safe handling for reflection-based attributes and ByValArray element types.
  • Improve XML documentation comments by adding missing public API docs.

Contributes towards #17285.

This is file 3 of 7 files with nullability disabled in ObjCRuntime.

* Enable nullability (#nullable enable).
* Add null argument validation for stret helpers to improve static analysis and runtime diagnostics.
* Add nullable-safe handling for reflection-based attributes and ByValArray element types.
* Improve XML documentation comments by adding missing public API docs.

Contributes towards #17285.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables nullability in Stret.cs, which is part of an effort to add nullability to ObjCRuntime files (issue #17285). The file is shared between product assemblies and the generator tool, requiring special handling for conditional compilation.

Changes:

  • Enabled #nullable enable and added null argument validation using ArgumentNullException.ThrowIfNull
  • Made reflection API calls null-safe by casting results to nullable types and checking for null
  • Added a GetTypeName helper method for consistent type name formatting in error messages
  • Enhanced XML documentation for public methods

@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

This comment has been minimized.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rolfbjarne rolfbjarne enabled auto-merge (squash) February 19, 2026 08:53
@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

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #1250ca6] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #1250ca6] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #1250ca6] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #1250ca6] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #1250ca6] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #1250ca6] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #1250ca6] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #1250ca6] Tests on macOS arm64 - Mac Tahoe (26) passed 💻

All tests on macOS arm64 - Mac Tahoe (26) passed.

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #1250ca6] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 131 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 1250ca660a68e8ca4478554bead119b153cba24e [PR build]

@rolfbjarne rolfbjarne merged commit d0d4791 into main Feb 19, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants