-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Crash when formatting with config file #824
Comments
@nojaf The reason for the error is a formatting error. This is the result of the formatting of the supplied source:
The two long variables being split into two lines seems to be invalid F# - I tried to compile it and got an error. Moving both variable names into the same line makes it compile. I would begin working on this issue by making sure that multiple variable names are always kept on the same line, including the |
@Bobface what happens if you add let someOtherFunc () =
let (var1withAVeryLongLongLongLongLongLongName,
var2withAVeryLongLongLongLongLongLongName)
=
someFunc 1, someFunc 2
() |
@nojaf That compiles fine. Is this your preferred way? |
Mmm, but if fantomas does this, it would be the first case I know that it adds parenthesis when they were not there already, which to me doesn't sound as the best approach. |
Fantomas does this in other places as well. This is a trade-off situation. Putting it all on the same line will lead to someone opening an issue "hey the page width is not respected" or "in-consist style when tuple destructering is involved". I would go for the parenthesis approach here. |
This would make it even harder to come up with a solution for #684 :( |
Not necessarily, the case where we add parenthesis is clearly defined and scoped to the area to tuple destructuring in let bindings. So I don't see an immediate correlation to #684 here. |
PLEASE USE THE ONLINE TOOL TO REPORT BUGS!!
Sorry, I don't reproduce this problem with the online tool.
Repro code:
Fantomas config file:
Call fantomas with:
Results:
The text was updated successfully, but these errors were encountered: