Skip to content
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

Idempotency problem when exception definition used in signature file #1974

Closed
3 tasks
dsyme opened this issue Nov 20, 2021 · 2 comments · Fixed by #1978
Closed
3 tasks

Idempotency problem when exception definition used in signature file #1974

dsyme opened this issue Nov 20, 2021 · 2 comments · Fixed by #1978

Comments

@dsyme
Copy link
Contributor

dsyme commented Nov 20, 2021

Issue created from fantomas-online

Formatted code

module internal FSharp.Compiler.ParseHelpers

open FSharp.Compiler.AbstractIL.IL


/// The error raised by the parse_error_rich function, which is called by the parser engine
[<NoEquality; NoComparison>]
exception SyntaxError of obj * range: range

Reformatted code

module internal FSharp.Compiler.ParseHelpers

open FSharp.Compiler.AbstractIL.IL



/// The error raised by the parse_error_rich function, which is called by the parser engine
[<NoEquality; NoComparison>]
exception SyntaxError of obj * range: range

Problem description

Fantomas was not able to produce the same code after reformatting the result.

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas 4.6 branch at 11/19/2021 20:14:05 - 720227d

Default Fantomas configuration

Signature file

Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?

@dsyme
Copy link
Contributor Author

dsyme commented Nov 20, 2021

An extra line has been added

@nojaf
Copy link
Contributor

nojaf commented Nov 20, 2021

Good catch, this looks like a Repeating newline bug.

nojaf added a commit to nojaf/fantomas that referenced this issue Nov 24, 2021
@nojaf nojaf closed this as completed in 8338891 Jan 14, 2022
jindraivanek pushed a commit to jindraivanek/fantomas that referenced this issue Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants