Sitelet https://github.com/fsprojects/FSharp.Formatting/pull/1317
Skip to content

Keep comments of type abbreviations to tuples - #1317

Merged
nojaf merged 1 commit into
fsprojects:mainfrom
nojaf:fix-1314
Sep 14, 2026
Merged

nojaf merged 1 commit into
fsprojects:mainfrom
nojaf:fix-1314

Conversation

@nojaf

@nojaf nojaf commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

The compiler reports the members of the abbreviated type as members of the abbreviation itself, e.g. Item1 and Item2 for type P = int * int. Those members were registered in the cross-reference resolver and read as members of the abbreviation. With warn-on-missing-docs on, looking up such a member hit its declaring entity (System.Tuple, FSharpList, System.String), which is never registered, and the resolver threw "The entity ... was not registered before". The exception escaped the whole entity read, so the abbreviation's own comment was dropped.

An abbreviation declares no members, so the symbol reader no longer lists the target type's members on its page, and the resolver no longer registers them. Resolving a member whose declaring entity is not in the documentation set now falls back to an external link instead of throwing.

Fixes #1314

Before:

image

(The list methods don't make sense here)

After:

image

@dsyme please also take a look at this one.

The compiler reports the members of the abbreviated type as members of
the abbreviation itself, e.g. Item1 and Item2 for `type P = int * int`.
Those members were registered in the cross-reference resolver and read
as members of the abbreviation. With warn-on-missing-docs on, looking
up such a member hit its declaring entity (System.Tuple, FSharpList,
System.String), which is never registered, and the resolver threw "The
entity ... was not registered before". The exception escaped the whole
entity read, so the abbreviation's own comment was dropped.

An abbreviation declares no members, so the symbol reader no longer
lists the target type's members on its page, and the resolver no longer
registers them. Resolving a member whose declaring entity is not in the
documentation set now falls back to an external link instead of
throwing.

Fixes fsprojects#1314
@nojaf
nojaf requested a review from dsyme September 14, 2026 09:15
@nojaf
nojaf merged commit 411c3c9 into fsprojects:main Sep 14, 2026
11 checks passed
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.

Comments dropped for type abbreviations of tuples, lists and string: "entity was not registered before"

2 participants