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

Bug: formatting did not stabilize after 10 iterations with function attribute, a long comment, and janestreet formatting #2586

Open
dbremner opened this issue Oct 10, 2024 · 0 comments

Comments

@dbremner
Copy link

dbremner commented Oct 10, 2024

Describe the bug
I encountered this issue while formatting a file in one of my projects. It's length dependent and really subtle - adding or removing a character from the comment will cause ocamlformat to format it successfully.

How to Reproduce
Steps to reproduce the behavior:

  1. Save the snippet in step 2 to a file, e.g. testcase.ml
  2. Invoke ocamlformat on it ocamlformat testcase.ml using janestreet formatting.
    let[@warning "-27"] (* Lorem ipsum dolor sit amet, consectetur adipiscing elit, eius *) run root = root
  • What are the selected options?
profile = janestreet
version = 0.26.2

Thanks for considering this bug report. Please let me know if there's anything else I can provide.

@dbremner dbremner changed the title Bug: crash with function attribute, a long comment, and janestreet formatting Bug: formatting did not stabilize after 10 iterations with function attribute, a long comment, and janestreet formatting Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant