Skip to content

Is XML doc id expected to "uniquely" identify a method? #18483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Youssef1313 opened this issue Apr 17, 2025 · 2 comments
Closed

Is XML doc id expected to "uniquely" identify a method? #18483

Youssef1313 opened this issue Apr 17, 2025 · 2 comments
Milestone

Comments

@Youssef1313
Copy link
Member

Being an "id" looks to me like it should be able to uniquely identify a method (or generally any member, being namespace, method, type, property, event).

In a niche case like the following:

type C() =
    /// <summary>
    /// </summary>
    member this.M(s: string) = ()

    /// <summary>
    /// </summary>
    member this.``M(System.String)``() = ()

Both methods will have the same id:

Image

@T-Gro
Copy link
Member

T-Gro commented Apr 17, 2025

It is and this example is indeed not unique.
At the same time, the format is established and is used for example for tooling scenarios to power C#<>F# navigation.

Given the likelihood of this happening in a real codebase, I think it does not justify changing the format for generated ids, no matter how hypothetically possible.

Language tooling relying on xmldoc ids should however be robust to not crash when a duplicate is encountered. A worsened experienced would be understood in this scenario IMO.

@Youssef1313
Copy link
Member Author

Thanks. Closing out then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants