From 6126fc3fd912af22aa3a58123a3ac29c263de8e4 Mon Sep 17 00:00:00 2001 From: "Hezekiah M. Carty" Date: Mon, 4 Dec 2017 11:15:14 -0700 Subject: [PATCH] Update Translation_unit.ml --- src/Translation_unit.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Translation_unit.ml b/src/Translation_unit.ml index b2e9ec43bb..4b6f08fb21 100644 --- a/src/Translation_unit.ml +++ b/src/Translation_unit.ml @@ -129,8 +129,12 @@ let parse_print (XUnit xunit) (conf: Conf.t) iname ifile ic ofile = | Inplace _, _ -> Unix.unlink tmp in let source = In_channel.with_file ifile ~f:In_channel.input_all in - try parse_print_ 1 source ifile ic with - | Warnings.Errors -> Caml.exit 1 + (* NOTE: Warning 28 is suppressed due to a difference in exception + constructor arity between OCaml versions. See this + ocaml-migrate-parsetree issue for potential future mitigation. + https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues/34 *) + try[@ocaml.warning "-28"] parse_print_ 1 source ifile ic with + | Warnings.Errors _ -> Caml.exit 1 | Syntaxerr.Error _ as exc -> Location.report_exception Caml.Format.err_formatter exc ; Caml.exit 1