From 04fc91fba4db5c9e74e522180270a2dac25df11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Wed, 15 Feb 2023 14:31:47 +0100 Subject: [PATCH 1/2] dune_file_watcher: do not exclude _opam and _esy systematically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ojeda Bär --- src/dune_file_watcher/dune_file_watcher.ml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/dune_file_watcher/dune_file_watcher.ml b/src/dune_file_watcher/dune_file_watcher.ml index 5b679f2478c..450899407cb 100644 --- a/src/dune_file_watcher/dune_file_watcher.ml +++ b/src/dune_file_watcher/dune_file_watcher.ml @@ -149,11 +149,7 @@ type t = } let exclude_patterns = - [ {|^_opam|} - ; {|/_opam|} - ; {|^_esy|} - ; {|/_esy|} - ; {|^\.#.*|} (* Such files can be created by Emacs and also Dune itself. *) + [ {|^\.#.*|} (* Such files can be created by Emacs and also Dune itself. *) ; {|/\.#.*|} ; {|~$|} ; {|^#[^#]*#$|} @@ -308,9 +304,7 @@ let command ~root ~backend = let exclude_paths = (* These paths should already exist on the filesystem when the watches are initially set up, otherwise the @ has no effect for inotifywait. If - the file is deleted and re-created then "exclusion" is lost. This is why - we're not including "_opam" and "_esy" in this list, in case they are - created when dune is already running. *) + the file is deleted and re-created then "exclusion" is lost. *) (* these paths are used as patterns for fswatch, so they better not contain any regex-special characters *) [ "_build" ] From 3550f481687e5152add16e4e3c7a3fdd73890b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Wed, 15 Feb 2023 15:19:42 +0100 Subject: [PATCH 2/2] Accept MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ojeda Bär --- .../dune_file_watcher/dune_file_watcher_tests_patterns.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/expect-tests/dune_file_watcher/dune_file_watcher_tests_patterns.ml b/test/expect-tests/dune_file_watcher/dune_file_watcher_tests_patterns.ml index 6c441fe2310..8900514e7eb 100644 --- a/test/expect-tests/dune_file_watcher/dune_file_watcher_tests_patterns.ml +++ b/test/expect-tests/dune_file_watcher/dune_file_watcher_tests_patterns.ml @@ -28,8 +28,8 @@ let%expect_test _ = should_exclude(dir/4913) = true should_exclude(4913.ml) = false should_exclude(84913) = false - should_exclude(_opam) = true - should_exclude(dir/_opam) = true + should_exclude(_opam) = false + should_exclude(dir/_opam) = false should_exclude(this_is_not_opam) = false should_exclude(#file#) = true should_exclude(dir/#file#) = true