Keep comments of type abbreviations to tuples - #1317
Open
nojaf wants to merge 1 commit into
Open
Conversation
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
17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
(The list methods don't make sense here)
After:
@dsyme please also take a look at this one.