Skip to content

[bgen][docs] Add XML documentation for every Dispose(bool) override - #26301

Merged
rolfbjarne merged 7 commits into
mainfrom
dev/rolf/didactic-telegram
Jul 30, 2026
Merged

[bgen][docs] Add XML documentation for every Dispose(bool) override#26301
rolfbjarne merged 7 commits into
mainfrom
dev/rolf/didactic-telegram

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Every protected override void Dispose (bool disposing) in the bindings
now gets XML documentation, removing ~529 generated entries (plus the base
DisposableObject.Dispose) from the cecil Documentation known-failures list.

Changes:

  • bgen: the generated Dispose (bool disposing) now emits /// <inheritdoc />
    (guarded by BindingTouch.SupportsXmlDocumentation), so each bound type inherits
    the documentation from its actual base class.
  • ObjCRuntime.DisposableObject: added real XML docs to Dispose () and
    Dispose (bool) so the inheritdoc chain (NativeObject and the many
    CoreFoundation/etc. types deriving from it) resolves to meaningful documentation.
  • tests/cecil-tests: removed the 530 now-documented Dispose(System.Boolean)
    (and DisposableObject.Dispose) entries from Documentation.KnownFailures.txt.

The ~48 hand-written Dispose (bool) overrides under src/ already carried
/// <inheritdoc />, so no changes were needed there.

Plain <inheritdoc/> is the correct approach: the cecil
VerifyEveryVisibleMemberIsDocumented test only requires a <member> entry to
exist in the compiler-generated XML, and Roslyn writes <inheritdoc/> literally
regardless of the base member's doc state. It introduces no crefs, so
VerifyNoUnresolvedCrefs is unaffected.

🤖 Pull request created by Copilot

rolfbjarne and others added 2 commits July 24, 2026 16:37
Emit '/// <inheritdoc />' for the bgen-generated
'protected override void Dispose (bool disposing)' method (guarded by
BindingTouch.SupportsXmlDocumentation), and add real XML documentation to
ObjCRuntime.DisposableObject's Dispose() and Dispose(bool) so the inheritdoc
chain resolves to meaningful content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05a72201-e64f-4c79-9d23-1e5b344a0b45
…n known failures

With bgen emitting '/// <inheritdoc />' for generated Dispose(bool) methods and
ObjCRuntime.DisposableObject's Dispose()/Dispose(bool) now documented, the
Documentation.VerifyEveryVisibleMemberIsDocumented test no longer needs these
530 entries (529 'Dispose(System.Boolean)' plus DisposableObject.Dispose) as
known failures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05a72201-e64f-4c79-9d23-1e5b344a0b45
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 improves XML documentation coverage for the common Dispose (bool disposing) override pattern in generated bindings by having bgen emit /// <inheritdoc /> for generated overrides and by adding real XML docs to ObjCRuntime.DisposableObject so the inheritdoc chain resolves to meaningful content. It also updates the cecil documentation known-failures list to remove entries that should now be documented.

Changes:

  • bgen now emits /// <inheritdoc /> for generated protected override void Dispose (bool disposing) when XML documentation is enabled.
  • Added XML documentation for ObjCRuntime.DisposableObject.Dispose () and Dispose (bool) to provide a solid base for inheritdoc.
  • Removed now-documented Dispose(System.Boolean) entries from tests/cecil-tests/Documentation.KnownFailures.txt.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/cecil-tests/Documentation.KnownFailures.txt Removes Dispose(System.Boolean) entries that should now have XML doc <member> output.
src/ObjCRuntime/DisposableObject.cs Adds base XML docs for Dispose() and Dispose(bool) to make inheritdoc meaningful.
src/bgen/Generator.cs Emits /// <inheritdoc /> for generated Dispose(bool) overrides when XML docs are enabled.

Comment thread src/bgen/Generator.cs Outdated
@rolfbjarne
rolfbjarne marked this pull request as ready for review July 27, 2026 18:09
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Address review feedback: 'there'a any [Dispose] attribute' -> 'there are
any [Dispose] attributes'.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 05a72201-e64f-4c79-9d23-1e5b344a0b45
@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.

…egram

# Conflicts:
#	tests/cecil-tests/Documentation.KnownFailures.txt
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne
rolfbjarne enabled auto-merge (squash) July 29, 2026 18:14
@rolfbjarne rolfbjarne added the ready-to-review This PR is ready to review/merge. label Jul 29, 2026
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
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: 83d802fb364f5ac706d99f29833093236a7a5e68 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #83d802f] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 203 tests passed 🎉

Tests counts

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ 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 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 19 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (tvOS): All 19 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. [attempt 2] 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

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 83d802fb364f5ac706d99f29833093236a7a5e68 [PR build]

@rolfbjarne
rolfbjarne merged commit 6e9f7dc into main Jul 30, 2026
57 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/didactic-telegram branch July 30, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot ready-to-review This PR is ready to review/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants