[tests] Skip event add/remove accessors in the documentation cecil-test - #26297
[tests] Skip event add/remove accessors in the documentation cecil-test#26297rolfbjarne wants to merge 6 commits into
Conversation
Event add/remove accessors are compiler-generated and cannot carry XML documentation (it belongs on the event itself), exactly like property getters/setters which the test already skips. Skip them using the existing IsEventMethod () helper. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ef5c582-7579-44fe-899b-4510883f61ee
Remove the 1284 event add_/remove_ accessor entries from the documentation cecil-test allow-list, now that the test skips event accessors (they can't carry XML docs individually). This is equivalent to regenerating the file with WRITE_KNOWN_FAILURES=1: the test asserts an exact match between the allow-list and the current undocumented-member set (it fails on both new AND stale entries), so the committed baseline exactly equals that set. Adding the IsEventMethod skip only removes members from the set, so the regenerated file is the current file minus the event-accessor lines. Verified with Mono.Cecil across all four platform assemblies that every add_/remove_ method is an event accessor and every event method is add_/remove_ (no non-event add_/remove_ methods, no invoke/other event methods), so the removal is exact. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ef5c582-7579-44fe-899b-4510883f61ee
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR improves the VerifyEveryVisibleMemberIsDocumented cecil-based documentation test by excluding compiler-generated event accessor methods (add_/remove_) from documentation verification, aligning behavior with the existing property accessor skip.
Changes:
- Skip event methods in
GetAssemblyMembersusing the existingIsEventMethod ()helper. - Regenerate
Documentation.KnownFailures.txtto remove now-irrelevant event accessor entries (1284 lines removed).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/cecil-tests/Documentation.cs | Skips event accessor methods during member enumeration so the doc test doesn’t require impossible XML doc entries. |
| tests/cecil-tests/Documentation.KnownFailures.txt | Removes add_/remove_ accessor entries from the allow-list baseline to match the updated test behavior. |
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.
# Conflicts: # tests/cecil-tests/Documentation.KnownFailures.txt
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.
# Conflicts: # tests/cecil-tests/Documentation.KnownFailures.txt
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
# Conflicts: # tests/cecil-tests/Documentation.KnownFailures.txt
✅ 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 #7e56322] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 43 tests failed, 160 tests passed. Failures❌ dotnettests tests (iOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ dotnettests tests (macOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ dotnettests tests (tvOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (iOS)19 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (tvOS)19 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ msbuild tests1 tests failed, 1 tests passed.Failed tests
Html Report (VSDrops) Download ❌ windows tests1 tests failed, 2 tests passed.Failed tests
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 |
The
VerifyEveryVisibleMemberIsDocumenteddocumentation cecil-test walksevery publicly-visible member and fails if it has no
<member>entry in thegenerated XML documentation, using
Documentation.KnownFailures.txtas anallow-list so only newly-undocumented APIs are caught.
Compiler-generated event
add_/remove_accessors cannot carry XMLdocumentation — it belongs on the
eventitself, exactly like propertygetters/setters (which the test already skips). Yet 1284 such accessors
(642
add_+ 642remove_) were listed as known failures. Evidence this isa pure test limitation and not missing docs: ~460 of the affected events are
themselves documented, but their accessors still showed up as failures.
Changes:
GetAssemblyMembers, right after theexisting
IsPropertyAccessor ()skip, reusing the existingIsEventMethod ()helper.Documentation.KnownFailures.txt, removing the 1284add_/remove_accessor entries (pure deletion, order preserved).Note: the actual test couldn't be run here because it requires Xcode 26.6
(only 26.3 is installed) and only runs when all four platforms are enabled.
The regeneration was instead proven exact: the test asserts an exact match
between the allow-list and the current undocumented-member set (it fails on
both new and stale entries), so the committed baseline equals that set; the
change only removes members, so regenerated == current minus the
event-accessor lines. Validated with Mono.Cecil across all four platform
implementation assemblies that every
add_/remove_method is an eventaccessor and every event method is
add_/remove_(0 non-event add/remove,0 invoke/other).
🤖 Pull request created by Copilot