-
Notifications
You must be signed in to change notification settings - Fork 795
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
Printing updates #12072
Printing updates #12072
Conversation
@KevinRansom @TIHan @vzarytovskii This is ready However we should first get #12047 in and then I'll integrate (it will take a bit of work) |
@TIHan This is ready (assuming it goes green) |
@TIHan ready! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a large change right before imminent release, but the changes here are really just printing improvements and other minor refactorings. Looks good and excited to see how signature generation has improved :) , as well as tooltips.
* printing updates * printing updates * fix tests * fix tests * Print 'abstract' instead of 'abstract member' * Print 'abstract' instead of 'abstract member' * update tests * simplify code for laying out type definitions * adjust tests * fix printing of backtick and operator identifiers * update tests * update more tests * multi-line curried signature formatting * don't print literals twice * fix tests * fix tests * fix names in completion list * systematize the demangling (DisplayNameCore) and addition of parens/backticks (DisplayName) * fix a test case * update baseline * fix signature generation and re-enable tests * fix list completion * fix list completion * always show [<Struct>] * always show [<Struct>] Co-authored-by: Don Syme <donsyme@fastmail.com>
This updates signature printing to print in ways that are consistent with the F# style guide
Spacing in printed and generated signatures doesn't follow F# style guide #12090
Printing shows begin/end for modules unnecessarily #12089
Types print as
int []
notint[]
#12088Literal values are shown twice in F# Interactive outputs #12091
Show 'abstract' not 'abstract member' #12092
Suppress with/end, class/end, interface/end, struct/end from displays when not needed #12093
Signature printing doesn't escape all identifiers correctly #12094
Format multi-line curried signatures according to the preferred style guide proposal https://github.com/dotnet/docs/issues/25917
This part of Printing of type signatures has inaccuracies, especially from --sig:file.fsi #393 (comment)
Another part of Printing of type signatures has inaccuracies, especially from --sig:file.fsi #393 (comment)
Go to Metadata - fully qualified names for members mess up printing #11523 (see sample for System.Char generation)
Go to Metadata - fields in structs issue #11524
FCS change:
symbol.DisplayName
will now include backticks when they are necessary to make the name a valid identifier. For example previously a symbol with logical nameA-B
would give( A-B )
as the display name, which is not valid F# identifier text. Instead``A-B``
will be returned bysymbol.DisplayName
.Also cleanup:
TRecdRepr
-->TFSharpRecdRepr
etc. to make it clear they only apply to F#-declared things. This can help when reading code, and also as we increase interop with C# records etc.Some tests to update but all routine.