Skip to content
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

Fix GetDocumentationComment returns unresolved doc reference for inheritdoc typeparamref #70230

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

yufeih
Copy link
Contributor

@yufeih yufeih commented Oct 4, 2023

The expansion of <typeparamref> for <inheritdoc/> can produce unresolved cref references for uninstantiated generic type parameters, causing downstream tools unable to distinguish between an unresolved typeparamref vs a user error. This PR fixes that by only replace <typeparamref> for valid documentation ids.

Related: 984c295
Fixes dotnet/docfx#8948

@yufeih yufeih requested a review from a team as a code owner October 4, 2023 05:37
@ghost ghost added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Oct 4, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 4, 2023
@CyrusNajmabadi
Copy link
Member

@sharwell ?

i'm a little surprised by this as i would not expect this to be public functionality that could be used from teh docs repo.

@yufeih
Copy link
Contributor Author

yufeih commented Oct 4, 2023

This is not a public functionality, docfx tried to reuse what Roslyn had for inheritdoc support and noticed this problem. I feel like this could be fixed in Roslyn itself or otherwise we can looking into workarounds in docfx.

@yufeih
Copy link
Contributor Author

yufeih commented Nov 30, 2023

Any chance this gets merged?

@sharwell sharwell merged commit e8a8be0 into dotnet:main Dec 19, 2023
24 checks passed
@ghost ghost added this to the Next milestone Dec 19, 2023
@yufeih yufeih deleted the inheritdoc-typeparamref branch December 20, 2023 01:50
@yufeih
Copy link
Contributor Author

yufeih commented Dec 20, 2023

Thank you @sharwell !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] <inheritdoc /> + <typeparamref > = empty string (and warning)
4 participants