5.2.0~alpha1: Format.pp_set_geometry cannot be set to Int.max_int anymore #12986
kit-ty-kate
started this conversation in
General
Replies: 2 comments
-
This turns out to be more annoying than expected. One has to write |
Beta Was this translation helpful? Give feedback.
0 replies
-
Using I was wondering if the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
#12477 added a check for each geometry when using
Format.pp_set_geometry
so that the margin wouldn't go abovepp_infinity
. This has the intended consequence of making such code fail at runtime:I've noticed this code used in the wild in at least https://github.com/RedPRL/asai (other users may not have surfaced yet due to the runtime nature of the failure) and I'm wondering what would be the best course of action for users that have this sort of code.
Replace
Int.max_int
by1_000_000_000
and add a TODO comment asking to replace it in the future byFormat.pp_infinity
when the project requires at least OCaml 5.2 ?Beta Was this translation helpful? Give feedback.
All reactions