-
-
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
Strict mode strips literal strings #560
Comments
Hello @Smaug123 , Strict mode means it will only use the information found in the UnTyped AST to print out the formatted code. The AST, in this case, looks like this:
The This is a known limitation and your best bet to resolve this is to open an issue at the dotnet/fsharp repo. |
I'm not convinced that Fantomas should just pass this off to the F# compiler. Isn't the |
@Smaug123 as we currently don't have this issue in a non-strict mode, I made a suggestion to store this information in the Syntax tree compiler dotnet/fsharp#10209. Yes, Fantomas could try and detect this based on the content of the string but the compiler at some point has this information, so it seems like a good case to get my feet wet in extended the compiler itself. |
Good idea - this is certainly not a high-priority ticket, we don't expect to be using strict mode. |
Following up on this, with a lot of help of Chet, we were able to submit dotnet/fsharp#10769. |
FCS 40, has what we need for this. Looking forward! |
Issue created from fantomas-ui
Strict mode causes the
@
to be stripped from strings, possibly causing code to stop compiling.Code
Error
Options
Fantomas Next - 3.0.1-11/13/2019
IndentOnTryWith
false
IndentSpaceNum
4
KeepNewlineAfter
false
PageWidth
120
ReorderOpenDeclaration
false
SemicolonAtEndOfLine
false
SpaceAfterComma
false
SpaceAfterSemicolon
false
SpaceAroundDelimiter
false
SpaceBeforeArgument
false
SpaceBeforeColon
false
StrictMode
true
The text was updated successfully, but these errors were encountered: