Skip to content

fix: resolve local namespace links through xrefs - #11163

Merged
vicancy merged 4 commits into
dotnet:mainfrom
vicancy:vicancy-namespace-fix-from-main
Sep 24, 2026
Merged

vicancy merged 4 commits into
dotnet:mainfrom
vicancy:vicancy-namespace-fix-from-main

Conversation

@vicancy

@vicancy vicancy commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #10588.

Thanks @TimHess for #11012 and the tests. This keeps those test cases but tries a different fix for the namespace link regression from #8588.

Differences

#11012 generates URLs first, then clears links whose UIDs are missing from the metadata.

This PR leaves local namespace hrefs unset. docfx build resolves them instead. This only changes mref; apiPage and Markdown keep their current behavior.

Trade-offs

#11012 preserves existing hrefs where possible. But the cleanup can also remove valid links, like Outer<int>.Inner. The new ConstructedNestedTypesKeepUrls test covers this case.

This PR avoids that cleanup. But namespace hrefs won’t be available right after metadata generation. I’m not sure if any workflows depend on them at that stage.

@TimHess, what do you think? Any cases we might be missing?

Co-authored-by: Tim Hess <tim.hess@broadcom.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@TimHess

TimHess commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

I agree with prevention over cleanup. Running your Outer<int>.Inner case against our branch produces the same failure as the method/property one, just a different symbol kind.

Nothing concrete to add on anything missing, but one half-formed thought: your tests are all single-build, and this is the first time local namespace links go through the same xref resolution as external ones. Should it be tested against an external xrefmap.yml (separate site referencing this one)?

I'm fine with closing #11012 in favor of this approach

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

Copilot-Session: ec7b1c83-208d-4502-b67f-297527d8c20a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ec7b1c83-208d-4502-b67f-297527d8c20a
@vicancy
vicancy merged commit 30e9cbe into dotnet:main Sep 24, 2026
9 checks passed
@vicancy
vicancy deleted the vicancy-namespace-fix-from-main branch September 24, 2026 02:24
This was referenced Sep 26, 2026
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.

[Bug] Namespace links created for non-existing parent namespaces

2 participants