Skip to content

[repo-assist] Support top-level (seealso) XML doc tags in API docs - #1264

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/fix-issue-1256-seealso-b4bd46cd83322a47
Open

[repo-assist] Support top-level (seealso) XML doc tags in API docs#1264
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/fix-issue-1256-seealso-b4bd46cd83322a47

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant, in response to a /repo-assist command from @dsyme on issue #1256.

Closes #1256

Root cause

Per the [xmldoc recommended tags]((learn.microsoft.com/redacted), <seealso cref="..."/> is meant to be a top-level doc-comment section (distinct from the inline <see cref="..."/> tag). FSharp.Formatting's XML doc reader (XmlDocReader.fs) only handled <seealso> as an inline tag (identically to <see>), so top-level <seealso> elements were silently dropped and never rendered.

Fix

  • Added a SeeAlso: (string * string option * ApiDocHtml) list member to ApiDocComment, modeled on the existing Exceptions field.
  • XmlDocReader.readXmlCommentAsHtmlAux now collects direct-child <seealso> elements (resolving cref via the existing cross-reference resolver, same as <exception cref="...">), and excludes them from the generic "unrecognised tag" raw-data bucket.
  • combineComments now merges SeeAlso lists when doc comments are combined.
  • Both GenerateHtml.fs and GenerateMarkdown.fs render a "See also" section (as a bullet/list of links) for members and entities that have one or more top-level <seealso> tags, following the existing rendering style used for Notes/Examples.

Inline <see cref="..."/> behavior (and the pre-existing inline handling of <seealso> embedded in running text) is unchanged.

Trade-offs / notes

  • Only direct child <seealso> elements of the member/type doc comment are treated as a top-level section; a <seealso> nested inside <para>/<summary> etc. still falls back to inline rendering (same as <see>), which matches how <exception> is already handled.
  • No new dependencies added; change is scoped to FSharp.Formatting.ApiDocs.

Test Status

  • ✅ Build succeeded (dotnet build src/FSharp.Formatting.ApiDocs/... -c Release, dotnet build tests/FSharp.ApiDocs.Tests/... -c Release)
  • ✅ Added 2 new tests (ApiDocs Markdown generates See also section for top-level seealso tags, ApiDocs HTML generates See also section for top-level seealso tags) exercising a new SeeAlsoExamples module added to the FsLib2 test fixture.
  • ✅ Full FSharp.ApiDocs.Tests suite: 90 passed, 0 failed, 4 skipped (pre-existing skips, unrelated to this change)
  • dotnet fantomas src tests --check — no formatting issues

As always, a human maintainer should review before merging. Thanks for reporting, @Tarmil!

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38

Renders a 'See also' section (list of links) for members and entities
that have top-level <seealso cref="..."/> XML doc tags, per the
xmldoc recommended-tags convention. Previously these tags were
silently ignored.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Aug 24, 2026
@dsyme
dsyme marked this pull request as ready for review August 24, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top-level <seealso>

0 participants