Fix unstable cmt in or-pattern#1173
Merged
gpetiot merged 3 commits intoocaml-ppx:masterfrom Dec 5, 2019
gpetiot:fix-unstable-cmt-pattern
Merged
Fix unstable cmt in or-pattern#1173gpetiot merged 3 commits intoocaml-ppx:masterfrom gpetiot:fix-unstable-cmt-pattern
gpetiot merged 3 commits intoocaml-ppx:masterfrom
gpetiot:fix-unstable-cmt-pattern
Conversation
Julow
reviewed
Dec 5, 2019
Collaborator
Julow
left a comment
There was a problem hiding this comment.
I find no diffs when running the tests you added on master with --profile=conventional and no instability.
This does reproduce the bug:
diff --git a/test/passing/break_cases.ml b/test/passing/break_cases.ml
index ffa6ba8..a0e8c18 100644
--- a/test/passing/break_cases.ml
+++ b/test/passing/break_cases.ml
@@ -225,8 +225,8 @@ let foooooooooooooo = function
Foooooooooooooooooooooooooooooooooooooo foooooooooooooooooooo foooooooooooooooooo foooooooo.
Foooooooooooo fooooooooooo fooooooooooooo foooooooooooooo foooooo.
*)
- | Foooo foooo
- | FooooFoooooFoooooo (* fooooooo fooooo fooo foooooooooooooo *)
+ | Foooooooooo
+ | Fooooooooooooooooo (* fooooooooooooooooooooooooooooooooooo *)
Julow
added a commit
to Julow/opam-repository
that referenced
this pull request
Jan 28, 2020
CHANGES: #### New features + Add an option `--margin-check` to emit a warning if the formatted output exceeds the margin (ocaml-ppx/ocamlformat#1110) (Guillaume Petiot) + Preserve comment indentation when `wrap-comments` is unset (ocaml-ppx/ocamlformat#1138, ocaml-ppx/ocamlformat#1159) (Jules Aguillon) + Improve error messages (ocaml-ppx/ocamlformat#1147) (Jules Aguillon) + Display standard output in the emacs plugin even when ocamlformat does not fail (ocaml-ppx/ocamlformat#1189) (Guillaume Petiot) #### Removed + Remove `ocamlformat_reason` (ocaml-ppx/ocamlformat#254, ocaml-ppx/ocamlformat#1185) (Etienne Millon). This tool has never been released to opam, has no known users, and overlaps with what `refmt` can do. + Remove `ocamlformat-diff` (ocaml-ppx/ocamlformat#1205) (Guillaume Petiot) This tool has never been released to opam, has no known users, and overlaps with what `merge-fmt` can do. #### Packaging + Work with base v0.13.0 (ocaml-ppx/ocamlformat#1163) (Jules Aguillon) #### Bug fixes + Fix placement of comments just before a '|' (ocaml-ppx/ocamlformat#1203) (Jules Aguillon) + Fix build version detection when building in the absence of a git root (ocaml-ppx/ocamlformat#1198) (Anil Madhavapeddy) + Fix wrapping of or-patterns in presence of comments with `break-cases=fit` (ocaml-ppx/ocamlformat#1167) (Jules Aguillon) This also fixes an unstable comment bug in or-patterns + Fix an unstable comment bug in variant declarations (ocaml-ppx/ocamlformat#1108) (Jules Aguillon) + Fix: break multiline comments (ocaml-ppx/ocamlformat#1122) (Guillaume Petiot) + Fix: types on named arguments were wrapped incorrectly when preceding comments (ocaml-ppx/ocamlformat#1124) (Guillaume Petiot) + Fix the indentation produced by max-indent (ocaml-ppx/ocamlformat#1118) (Guillaume Petiot) + Fix break after Psig_include depending on presence of docstring (ocaml-ppx/ocamlformat#1125) (Guillaume Petiot) + Remove some calls to if_newline and break_unless_newline and fix break before closing brackets (ocaml-ppx/ocamlformat#1168) (Guillaume Petiot) + Fix unstable cmt in or-pattern (ocaml-ppx/ocamlformat#1173) (Guillaume Petiot) + Fix location of comment attached to the underscore of an open record (ocaml-ppx/ocamlformat#1208) (Guillaume Petiot) + Fix parentheses around optional module parameter (ocaml-ppx/ocamlformat#1212) (Christian Barcenas) + Fix grouping of horizontally aligned comments (ocaml-ppx/ocamlformat#1209) (Guillaume Petiot) + Fix dropped comments around module pack expressions (ocaml-ppx/ocamlformat#1214) (Jules Aguillon) + Fix regression of comment position in list patterns (ocaml-ppx/ocamlformat#1141) (Josh Berdine) + Fix: adjust definition of Location.is_single_line to reflect margin (ocaml-ppx/ocamlformat#1102) (Josh Berdine) #### Documentation + Fix documentation of option `version-check` (ocaml-ppx/ocamlformat#1135) (Wilfred Hughes) + Fix hint when using `break-separators=after-and-docked` (ocaml-ppx/ocamlformat#1130) (Greta Yorsh)
bogdan2412
pushed a commit
to bogdan2412/ocamlformat
that referenced
this pull request
Mar 28, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue appeared in
test-extra/code/infer/infer/src/nullsafe/typeOrigin.mlwithprofile=conventional.The problem is fixed when testing locally but still appears with test_branch, comparing this branch with master. But everything is fine when comparing this branch with itself (non-stabilizing formatting should still appear if present).
So maybe there is some fixing to do in test_branch as well.