Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dune_file_watcher: do not exclude _opam and _esy systematically #7086

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/dune_file_watcher/dune_file_watcher.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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. *)
; {|/\.#.*|}
; {|~$|}
; {|^#[^#]*#$|}
Expand Down Expand Up @@ -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 @<path> 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" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down