-
-
Notifications
You must be signed in to change notification settings - Fork 194
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 idempotency problem with multiline quotation expressions. #2211
Conversation
Extend Quote handling with expressionFitsOnRestOfLine.
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.
The code looks good, I would like to see the input from the style guide first.
src/Fantomas.Tests/QuotationTests.fs
Outdated
equal | ||
""" | ||
let action = | ||
<@ let msg = %httpRequestMessageWithPayload |
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.
I can understand your reasoning behind the change.
However, this leads to the following problem.
I won't deny that there are other places where Fantomas has this problem.
The point is that there are different ways of looking at this.
If it is ok with you I'd like you to bring it up with the F# style guide over at https://github.com/fsharp/fslang-design#style-guide? That would be interesting for you to see that process as well.
Once there is an outcome there, it can be picked up in the style guide and we can respect the outcome in Fantomas.
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.
Sure. To speed things up it might be good to include a proposal in the raised issue.
So if I understand you correctly, you prefer to have <@
/@>
on separate lines for multi line expressions, right?
Given your example, I think there is a good argument for that.
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.
Yes, I prefer it mainly because of the technical impact on Fantomas side.
Things are more straightforward if we can keep a multitude of the indent_size.
But I don't have the strongest opinion as I've never really used a quotation before.
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.
Here we go.
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 looks very good, well done!
Fixes #2203
I used a slightly different fix to be more in line with what we do sofar.
Mainly to not put the
<@
on separate lines.