despite using Pretty.sprint ~width:max_int, which should avoid such random line breaks.
The specific problem was that Pretty.breakAllMode was not being reset between different Pretty calls, so when it became active, following pretty-printing had such odd line breaks.
There were two more global variables in Pretty which were not being reset: topAlignAbsCol and aligns.
Now all global variables in Pretty are reset and restored properly.
This fixes the long-standing oddity where Goblint prints warnings like
despite using
Pretty.sprint ~width:max_int
, which should avoid such random line breaks.The specific problem was that
Pretty.breakAllMode
was not being reset between differentPretty
calls, so when it became active, following pretty-printing had such odd line breaks.There were two more global variables in
Pretty
which were not being reset:topAlignAbsCol
andaligns
. Now all global variables inPretty
are reset and restored properly.