Skip to content

Bug: polymorphic variant type w/ comments does not stabilize #1160

@ceastlund

Description

@ceastlund

Describe the bug
I format the following code:

type t = [
  | `XXXX (* __________________________________________________________________________________ *)
  | `XXXX (* __________________________________________________________________ *)
  | `XXXX (* _____________________________________________________ *)
  | `XXXX (* ___________________________________________________ *)
  | `XXXX (* ___________________________________________________ *)
  | `XXXX (* ________________________________________________ *)
  | `XXXX (* __________________________________________ *)
  | `XXXX (* _________________________________________ *)
  | `XXXX (* ______________________________________ *)
  | `XXXX (* ____________________________________ *)
]

I get this error message:

ocamlformat: Cannot process "original.ml".
  Please report this bug at https://github.com/ocaml-ppx/ocamlformat/issues.
  BUG: formatting did not stabilize after 10 iterations.

How to Reproduce
Run ocamlformat built from a906b5d with --profile=janestreet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions