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

Easy format outputs no margins with width 68 #13

Open
charlesetc opened this issue Jul 17, 2016 · 5 comments
Open

Easy format outputs no margins with width 68 #13

charlesetc opened this issue Jul 17, 2016 · 5 comments

Comments

@charlesetc
Copy link

This is an edited version of simple_example.ml that prints the same thing 3 times, once with width 67, once with width 68, and once with width 69.
https://gist.github.com/Charlesetc/42fdd7295bb364ae3ecd77ecc8a9da01

Here's the output:
https://gist.github.com/Charlesetc/74388e8740ef2ac49d68c21d5451bd6b

You can see that the 68 version doesn't have the proper indentation. This was found here: reasonml/reason#446

What a funny bug!

@mjambon
Copy link
Member

mjambon commented Jul 18, 2016

That's strange! Could you provide an OCaml version of the Reason program https://gist.github.com/Charlesetc/42fdd7295bb364ae3ecd77ecc8a9da01 ?

@jordwalke
Copy link
Collaborator

jordwalke commented Jul 19, 2016

I transformed that via the refmt program into OCaml via the following command:

curl https://gist.githubusercontent.com/Charlesetc/42fdd7295bb364ae3ecd77ecc8a9da01/raw/bd6632cc848260eb1844d5aedbab68c54f7bf688/breaking_margin.re | refmt -parse re -print ml -use-stdin true -is-interface-pp false

And it output:

https://gist.github.com/jordwalke/49e87326bce76f6e6fcf798f7bb5a50e

@charlesetc
Copy link
Author

Thanks @jordwalke - should've posted it in OCaml to start

@pieterv
Copy link

pieterv commented Dec 28, 2016

I am running into this as well, for now i have just setup a switch to change column width of 68 to 67, what a weird bug.

@jordwalke
Copy link
Collaborator

Yeah, it's very hard to imagine what could be causing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants