Skip to content

Fix stable C# generic outline signatures - #5025

Merged
Widthdom merged 5 commits into
mainfrom
fix-issue4916
Aug 1, 2026
Merged

Fix stable C# generic outline signatures#5025
Widthdom merged 5 commits into
mainfrom
fix-issue4916

Conversation

@Widthdom

@Widthdom Widthdom commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • derive stable, readable display signatures for generic C# callables while preserving canonical symbol identity, exact navigation, and old-index compatibility
  • normalize generic arity and type-parameter references across overloads, extension/local/explicit-interface methods, nested tuples, nullable/array types, attributes, defaults, comments, escaped identifiers, and Unicode escapes
  • document the display/fallback contract in the bilingual user and developer guides and add a bilingual changelog fragment

Root cause

The outline display builder treated callable parsing as an ordinary parameter-list lookup. Generic declarations could not reliably identify the method type-parameter list or lexically split complex C# parameters, so they fell back to line-based names such as Name@line.

Impact

Generic overloads now receive distinct, line-stable display names such as Convert<T>(T) and Convert<T1, T2>(T1, ref T2). Canonical paths, stored symbol identity, and exact-query aliases are unchanged. Incomplete legacy signatures retain the existing Name@line fallback.

Fixes #4916

Documentation and changelog

  • updated the English and Japanese sections of README.md, DEVELOPER_GUIDE.md, and TESTING_GUIDE.md
  • added the bilingual fragment changelog.d/unreleased/4916.fixed.md
  • did not edit CHANGELOG.md

Validation

  • focused Issue Emit stable signatures for generic C# method display names #4916 regression test: net8.0 and net9.0 passed
  • all DbReaderTests after the final review fixes: net8.0 682 passed; net9.0 681 passed, 1 skipped
  • full net9.0 Release suite: 10,612 passed, 420 skipped
  • full net8.0 Release suite: 11,083 passed, 7 skipped; three shared-load timing tests failed in-suite and each passed on isolated retry
  • dotnet build CodeIndex.sln -c Release --no-restore: 0 warnings, 0 errors
  • dotnet format CodeIndex.sln --no-restore --verify-no-changes
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • git diff --check
  • post-commit local index refresh and status --check --json: fresh, complete graph/reference/fold state, no failed checks

Adversarial review

Two Codex adversarial-review rounds were completed, the workflow maximum. Round-one findings covering placeholder collisions, lexical Unicode normalization, delimiter splitting, and Unicode identifiers were addressed. Round-two findings covering nested interpolated defaults, attribute comparison expressions, and comment trivia around generic delimiters were also addressed and regression-tested.

Follow-up candidates

None identified within the scope of Issue #4916.

@Widthdom
Widthdom marked this pull request as ready for review August 1, 2026 13:14
@Widthdom
Widthdom merged commit 90cde3c into main Aug 1, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4916 branch August 1, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emit stable signatures for generic C# method display names

1 participant