Skip to content

[ObjCRuntime] Enable nullability and clean up TrampolineBlockBase.#24741

Open
rolfbjarne wants to merge 1 commit intomainfrom
dev/rolf/objcruntime-nullability-trampolineblockbase-05
Open

[ObjCRuntime] Enable nullability and clean up TrampolineBlockBase.#24741
rolfbjarne wants to merge 1 commit intomainfrom
dev/rolf/objcruntime-nullability-trampolineblockbase-05

Conversation

@rolfbjarne
Copy link
Member

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

  • Enable nullability (#nullable enable).
  • Add nullability annotations and validation for block pointers and managed delegate retrieval.
  • Add missing XML documentation for the public type and protected members.
  • Fix wording typo in infrastructure comment.

Contributes towards #17285.

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

* Enable nullability (#nullable enable).
* Add nullability annotations and validation for block pointers and managed delegate retrieval.
* Add missing XML documentation for the public type and protected members.
* Fix wording typo in infrastructure comment.

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 annotations for the TrampolineBlockBase class in ObjCRuntime, addressing file 5 of 7 in issue #17285. The changes add comprehensive XML documentation for the public type and protected members, introduce nullability checking for block pointer validation, and update call sites to properly handle nullable return types. A typo in an infrastructure comment is also corrected.

Changes:

  • Enabled #nullable enable for TrampolineBlockBase.cs
  • Added XML documentation for public/protected members of TrampolineBlockBase
  • Updated GetExistingManagedDelegate to add null checking and return nullable types
  • Updated call sites to handle nullable delegate returns with explicit nullable casts

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/cecil-tests/Documentation.KnownFailures.txt Removes documentation failures for now-documented TrampolineBlockBase members
src/bgen/Generator.cs Updates generated code to cast GetExistingManagedDelegate result as nullable
src/UIKit/UIConfigurationColorTransformer.cs Adds nullable cast for GetExistingManagedDelegate return value
src/UIKit/UICellAccessory.cs Adds nullable cast for GetExistingManagedDelegate return value
src/ObjCRuntime/TrampolineBlockBase.cs Enables nullability, adds XML docs, fixes typo, and adds null checking to GetExistingManagedDelegate

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #524b04e] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 524b04e89619eb9b5da89033b56c35eae6f6200a [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #524b04e] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 524b04e89619eb9b5da89033b56c35eae6f6200a [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: 524b04e89619eb9b5da89033b56c35eae6f6200a [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #524b04e] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 524b04e89619eb9b5da89033b56c35eae6f6200a [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne enabled auto-merge (squash) February 19, 2026 16:32
@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build #524b04e] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 1 tests failed, 155 tests passed.

Failures

❌ linker tests [attempt 2]

1 tests failed, 43 tests passed.

Failed tests

  • trimmode copy/iOS - simulator/Debug: LaunchFailure

Html Report (VSDrops) Download

Successes

✅ 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
✅ 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

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 524b04e89619eb9b5da89033b56c35eae6f6200a [PR build]

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

Comments