Skip to content

Commit

Permalink
chore: rebuild on Create and Remove events
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Mar 13, 2024
1 parent 8c17d99 commit 8f8d164
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tooling/nargo_cli/src/cli/compile_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ fn watch_workspace(workspace: &Workspace, compile_options: &CompileOptions) -> n
let event_affects_noir_file =
event_paths.any(|path| path.extension().map_or(false, |ext| ext == "nr"));

matches!(event.kind, EventKind::Modify(_)) && event_affects_noir_file
let is_relevant_event_kind = matches!(
event.kind,
EventKind::Create(_) | EventKind::Modify(_) | EventKind::Remove(_)
);

is_relevant_event_kind && event_affects_noir_file
});

if noir_files_modified {
Expand Down

0 comments on commit 8f8d164

Please sign in to comment.