From 01ae6436c5a4477aa6440b4c1dc96ae196479928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Boillot?= Date: Wed, 17 Jul 2024 15:24:20 +0200 Subject: [PATCH] correctly delete preprocessor output after usage --- CHANGES.md | 1 + src/ocaml/driver/pparse.ml | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index fbd3de9515..db4af7b31e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ unreleased - Add `-unboxed-types` and `-no-unboxed-types` as ocaml ignored flags (#1795, fixes #1794) + editor modes - vim: fix python-3.12 syntax warnings in merlin.py (#1798) + - Fix merlinpp not removing temporary files (#1801, partly fixes #1802) merlin 5.1 ========== diff --git a/src/ocaml/driver/pparse.ml b/src/ocaml/driver/pparse.ml index 1e2eefbe91..8ac303161f 100644 --- a/src/ocaml/driver/pparse.ml +++ b/src/ocaml/driver/pparse.ml @@ -180,6 +180,7 @@ let apply_pp ~workdir ~filename ~source ~pp = let ic = open_in_bin fn_out in let result = Misc.string_of_file ic in close_in ic; + Misc.remove_file fn_out; Ok result let decode_potential_ast source =