-
-
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
Creating anonymous record based on a function call with a list arg fails #1749
Comments
@nojaf ah, thanks - i didn't notice that.
|
Thank you, I see what the problem now is. fantomas/src/Fantomas/CodePrinter.fs Lines 1298 to 1301 in 8611499
Both styles print the copy expression following the normal indentation flow. fantomas/src/Fantomas/CodePrinter.fs Line 2910 in 8611499
Something like: let copyExpr fieldsExpr e =
atCurrentColumnIndent (genExpr astContext e)
+> (!- " with"
+> indent
+> whenShortIndent indent
+> sepNln
+> fieldsExpr
+> whenShortIndent unindent
+> unindent) Are you interested in submitting a PR for this? |
I'll ask someone on the team if they'd be interested - for me, it's not something that I have the time to commit to doing, I have enough projects I'm working on currently. Please don't take that to mean that I expect you to do it - let's see if someone has the time and interest in doing it - but I'm glad I've at least reported this to you so someone can pick it up. For me, we're not depending on Fantomas at the moment and this has been a useful experiment to see how and where it works (definitely way better than when I last tried it a couple of years back). |
Hey Isaac, this is a good response thank you. I'm well aware of all your adventures in the F# community so this response is quite sensible. I also like the fact that you don't have any expectations on me personally solving this. From my side I don't have the aspiration to solve everybody's reported bug. Sometimes I just don't have a stake in the issue, so when that happens I usually leave some clues on what is going on and I ask the reporter if they are interested in taking a stab at this. Sometimes this works, sometimes it doesn't 😊. If somebody of your team is willing to pick this one up, I recommend checking out our Contribution Guidelines and optionally a couple of videos from the YouTube channel. In case, you were using Fantomas, you can always ignore formatting the file using a .fantomasignore file. |
Using Fantomas v4.5.0-alpha-019. Unfortunately I can't reproduce this in the tool - I suspect because I've changed some options (.editorconfig below), but I've narrowed it down to the following:
I've tried removing various elements from this, some of which make the code valid e.g. removing the parens around the list in the last line.
The text was updated successfully, but these errors were encountered: