Skip to content

[tests] Render an empty string for function pointers when computing DocIds. - #26572

Open
rolfbjarne wants to merge 3 commits into
mainfrom
dev/rolf/cecil-tests-functionpointertype-doc
Open

[tests] Render an empty string for function pointers when computing DocIds.#26572
rolfbjarne wants to merge 3 commits into
mainfrom
dev/rolf/cecil-tests-functionpointertype-doc

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Roslyn renders the DocId for function pointers as a simple string, so let us do the same thing.

Ref: dotnet/roslyn#48363

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

rolfbjarne and others added 2 commits September 7, 2026 19:54
Cecil's TypeReference.IsNested throws for FunctionPointerType instances
(function pointers can't be nested types, so GetDocId must return early
for them instead of trying to compute a doc id for a construct that
doesn't have one.

Extracted from the CoreMidi PR (dev/rolf/coremidi-copilot), since
CoreMidi's MidiDriverInterface introduces the first unmanaged function
pointer fields in the codebase and exposed this gap in the doc test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
EOF
)
…terType fix.

The GetDocId fix for FunctionPointerType changes the doc id computed for
methods with function pointer parameters: they were previously rendered
with a bogus ".method" placeholder, and are now rendered as an empty
string (matching the actual absence of a doc id fragment for such
parameters). Regenerated with WRITE_KNOWN_FAILURES=1.

Ref: dotnet/roslyn#48363

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 7, 2026 17:57
dalexsoto
dalexsoto previously approved these changes Sep 7, 2026

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.

🟢 Approval recommended

The changes are limited in scope, match Roslyn’s documented current output, and the known-failures list has been updated accordingly.

Pull request overview

Aligns the Cecil-based DocId computation used by tests/cecil-tests with Roslyn’s current behavior for function pointer types, so doc ID comparisons and known-failure tracking match what the compiler emits.

Changes:

  • Treat Mono.Cecil.FunctionPointerType as an empty string in GetDocId (TypeReference) to match Roslyn’s DocumentationCommentId output.
  • Update Documentation.KnownFailures.txt entries whose DocIds changed as a result of the new function-pointer formatting.
File summaries
File Description
tests/cecil-tests/Documentation.cs Adjusts DocId rendering to return an empty string for function pointer types.
tests/cecil-tests/Documentation.KnownFailures.txt Updates known-failure DocIds to match the new function pointer rendering.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread tests/cecil-tests/Documentation.cs
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #f3a053a] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 264 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 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 25 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 25 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 25 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 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

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: f3a053aff58434a1b1b95960e023eb8e4a1d3244 [PR build]

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rolfbjarne
rolfbjarne enabled auto-merge (squash) September 8, 2026 06:25
@rolfbjarne rolfbjarne added the ready-to-review This PR is ready to review/merge. label Sep 8, 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: 5a93f209b0ed22916b3417167ddcefcdb61e8994 [PR build]

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