-
-
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
Fantomas 2.8.1 introduces a regression where formatting with just an AST *no longer works* #321
Comments
7sharp9
pushed a commit
to 7sharp9/fantomas
that referenced
this issue
Oct 10, 2018
…on when there is a string present
Fixed by #322. |
@nojaf Yeah I use Fantomas in Falanx. Theres a dependency on Fantomas 2.8.1 in FsAst which I need to update to the patched version at some point. |
Ok, I'll release a new version this weekend to help out falanx |
Any news on a new release? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is because of a change where it is assumed that source is always Some even if an empty string is used:
https://github.com/fsprojects/fantomas/blob/master/src/Fantomas/CodeFormatterImpl.fs#L353
This has the effect of making the following error always occur:
https://github.com/fsprojects/fantomas/blob/master/src/Fantomas/CodeFormatterImpl.fs#L366-L368
As you can see before this change it was possible to supply None for the source code, now this simply fails with:
whenever just an AST is supplied.
The text was updated successfully, but these errors were encountered: