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

Fix printer in uncurried false mode #6378

Merged

Conversation

DZakh
Copy link
Contributor

@DZakh DZakh commented Aug 30, 2023

No description provided.

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

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

Is the problem only with -all?

@DZakh
Copy link
Contributor Author

DZakh commented Aug 30, 2023

I didn't test without it, but when I use format on save in ide it also doesn't work correctly

@cristianoc
Copy link
Collaborator

Looks like getUncurriedFromBsconfig is just broken.
It looks for the first line in bsconfig that does not have both "uncurried" and "false".
The first line in any bsconfig will match, and decide that the setting is uncurried.

(It should instead if there is a line that has both.)

@DZakh DZakh changed the title Add test for broken uncurried printer Fix printer in uncurried false mode Aug 30, 2023
@DZakh DZakh requested a review from cristianoc August 30, 2023 15:43
@DZakh DZakh force-pushed the add-uncurried-printer-test branch from 4050442 to bc09a87 Compare August 30, 2023 15:54
in
if uncurried then Config.uncurried := Uncurried
if not is_legacy_uncurried then Config.uncurried := Uncurried
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's great.
Perhaps the doc comment could be a little clearer too.

@cristianoc cristianoc merged commit 2defd97 into rescript-lang:master Aug 30, 2023
2 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.

None yet

2 participants