Skip to content
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

Merged
merged 27 commits into from
Sep 3, 2021
Merged

Printing updates #12072

merged 27 commits into from
Sep 3, 2021

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Aug 31, 2021

This updates signature printing to print in ways that are consistent with the F# style guide

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 name A-B would give ( A-B ) as the display name, which is not valid F# identifier text. Instead ``A-B`` will be returned by symbol.DisplayName.

Also cleanup:

  • Rename some things internally 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.

  • get it green

@dsyme dsyme added the Theme-Simple-F# A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language. label Aug 31, 2021
@dsyme
Copy link
Contributor Author

dsyme commented Sep 2, 2021

@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)

@dsyme
Copy link
Contributor Author

dsyme commented Sep 2, 2021

This needs one fix - the Declaration lists now contain ABC DEF entries, which is not what we want, e.g.

Before:

image

After:

image

@dsyme
Copy link
Contributor Author

dsyme commented Sep 3, 2021

@TIHan This is ready (assuming it goes green)

@dsyme
Copy link
Contributor Author

dsyme commented Sep 3, 2021

@TIHan ready! :)

Copy link
Contributor

@TIHan TIHan left a 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.

@TIHan TIHan merged commit b3d46d4 into dotnet:main Sep 3, 2021
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Theme-Simple-F# A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants