Josh Berdine
Josh Berdine
I think there are two potential degrees of surprising behavior here. If all arguments consumed by format strings could be reliably identified and formatted knowing the association between functions consumed...
I was thinking to try to parse strings as format strings, and then if successful use the resulting CamlinternalFormatBasics.format6 value to determine the argument grouping. I'm not sure of the...
I suspect that item-attributes (i.e. `[@@ocaml.doc...]`) need to be generated instead, at least for let-bindings.
Note that ocamlformat operates on the untyped parsetree, rather than the type tree data structure from after type inference / checking has been done. It would be a major change,...
I would not be surprised if this was not due to any change between 0.15 and 0.19, other than changing the set of conspiring coincidences that let it manifest in...
The current message is not bad, but it does not indicate what the problem is specifically, just that something in the docstring isn't right. It would be better to more...
I wonder if using the precedence of the operator would be a reasonable criterion. For example, perhaps everything at the [precedence](https://caml.inria.fr/pub/docs/manual-ocaml/expr.html#ss:precedence-and-associativity) of `::` and lower could be treated as fit-or-vertical,...
For maximal headaches, the threshold precedence level could be an int configure option. :-P
Related to https://github.com/ocaml-ppx/ocamlformat/pull/1169, but attributes and local opens have never been right I think.
Totally agree that testing is needed. After some discussion with @let-def and some further digging, there are at least two systematic testing approaches that look like they would be useful...