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

feat: Add a pretty.rs based MonoType formatter #4809

Merged
merged 3 commits into from
Jun 1, 2022
Merged

feat: Add a pretty.rs based MonoType formatter #4809

merged 3 commits into from
Jun 1, 2022

Conversation

Marwes
Copy link
Contributor

@Marwes Marwes commented May 31, 2022

The fmt::Display based formatter only included absolutely necessary whitespace which
creates compact output which is rather hard to read. By copying over the formatter used for ast::MonoType we get more readable output in error messages and the LSP.

(I checked flux-lsp and the only brekage is in a test due to the addition of whitespace).

BREAKING CHANGE

Some std::fmt::Display implementations have been removed in the types module. Convert to MonoType and use its Display implementation instead or write the formatting manually.

The `fmt::Display` based formatter only included absolutely necessary whitespace which
creates compact output which is rather hard to read. By copying over the formatter used for `ast::MonoType` we get more readable output in error messages and the LSP.
@Marwes Marwes requested a review from a team as a code owner May 31, 2022 14:39
@Marwes Marwes requested review from skartikey and removed request for a team May 31, 2022 14:39
Markus Westerlind added 2 commits May 31, 2022 18:32
Ensures that we always go through the pretty.rs implementation.

(I checked flux-lsp and the only brekage is in a test due to the addition of whitespace).

BREAKING CHANGE

Some `std::fmt::Display` implementations have been removed in the `types` module. Convert to `MonoType` and use its `Display` implementation instead or write the formatting manually.
Copy link
Contributor

@skartikey skartikey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please open an issue/PR to fix flux-lsp tests?

@Marwes Marwes merged commit 93cfab8 into master Jun 1, 2022
@Marwes Marwes deleted the format_type branch June 1, 2022 11:55
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.

2 participants