From c1894f6176bcde2ebdd7f0a57a7da00e57b4cd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Tue, 20 Feb 2024 14:17:01 +0100 Subject: [PATCH] Use open_in_bin not open_in for merlinpp (#1725) from jonahbeckford/fix-file-open-win32 --- CHANGES.md | 1 + src/ocaml/driver/pparse.ml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index b560864b6b..287063abfb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,7 @@ merlin NEXT_VERSION - Add a query_num field to the `ocamlmerlin` responses to detect server crashes (#1716) + editor modes - vim: load merlin under the ocamlinterface and ocamllex filetypes (#1340) + - Fix merlinpp not using binary file open (#1725, fixes #1724) merlin 4.13.1 ============= diff --git a/src/ocaml/driver/pparse.ml b/src/ocaml/driver/pparse.ml index 5916d95a56..1e2eefbe91 100644 --- a/src/ocaml/driver/pparse.ml +++ b/src/ocaml/driver/pparse.ml @@ -177,7 +177,7 @@ let apply_pp ~workdir ~filename ~source ~pp = end else if not (Sys.file_exists fn_out) then Error (WrongMagic comm) else - let ic = open_in fn_out in + let ic = open_in_bin fn_out in let result = Misc.string_of_file ic in close_in ic; Ok result