From e129410314b2e4e6ed7dc2c0814332a67444b01a Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Tue, 7 Jun 2016 16:28:27 +0200 Subject: Preventive compatibility fixes for flushing. In pre 8.6, `Pp` provided its own reimplementation of `Pervasives.flush_all`, with different semantics. Unfortunately, with the removal of `Pp.flush_all` in #179, a couple of points were silently switched to the `Pervasives` version, which may lead to some subtle printing differences. As a preventive measure, we restore the same semantics for these parts of the codebase. Note that we don't re-introduce Coq's `flush_all` for several reasons: - Consumers of the logging API should not mess with flushing and Formatters as this is backend dependent (i.e: when in IDEs). Use of `Format` should be fully encapsulated if we want some hope of IDEs taking full control. - As used, the old semantics of `flush_all` were fragile. --- lib/errors.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/errors.ml') diff --git a/lib/errors.ml b/lib/errors.ml index 8982dde148..1459141d1e 100644 --- a/lib/errors.ml +++ b/lib/errors.ml @@ -144,5 +144,5 @@ let handled e = let fatal_error info anomaly = let msg = info ++ fnl () in pp_with ~pp_tag:Ppstyle.pp_tag !Pp_control.err_ft msg; - flush_all (); + Format.pp_print_flush !Pp_control.err_ft (); exit (if anomaly then 129 else 1) -- cgit v1.2.3