Visitar URL original
[dotnet-linker] Emit standard documentation IDs for explicit generic interface members · Issue #27317 · dotnet/macios · GitHub
Skip to content

[dotnet-linker] Emit standard documentation IDs for explicit generic interface members #27317

Open

Description

@rolfbjarne

Apple platform

iOS, macOS, Mac Catalyst, tvOS

Framework version

Other: branches containing the workaround in #27307.

Affected platform version

N/A: this is a linker and assembly-preparer follow-up.

Description

The workaround in #27307 emits angle brackets in DynamicDependency member names for explicit implementations of generic interfaces because ILLink and ILC cannot currently parse the standard brace form. Properties and events already use angle brackets.

After dotnet/runtime#137350 is fixed and the fix is available in the supported SDKs, remove the workaround and emit the standard documentation ID format for methods, accessors, properties, and events. For example, emit IGeneric{System#String}#M rather than IGeneric<System#String>#M. Keep the existing documentation ID formatting for parameter types.

Cover interfaces with single, multiple, and nested type arguments, and verify that ILLink and ILC resolve the generated signatures and preserve the members.

Steps to Reproduce

  1. On a branch containing [dotnet-linker] Emit parseable generic interface member signatures #27307, apply [Preserve (AllMembers = true)] to a type that explicitly implements IGeneric<string>.
  2. Inspect the generated DynamicDependency member signatures: the interface name uses angle brackets instead of the standard braces.

Did you find any workaround?

The proposed workaround in #27307 uses the form accepted by ILLink and ILC for interfaces with one type argument. Interfaces with multiple type arguments still need the runtime parser fix.

Relevant log output

N/A.

Note

This issue was generated by GitHub Copilot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions