Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
22 changes: 19 additions & 3 deletions app/buck2_file_watcher/src/file_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,26 @@ impl dyn FileWatcher {
WatchmanFileWatcher::new(project_root.root(), root_config, cells, ignore_specs)
.buck_error_context("Creating watchman file watcher")?,
)),
"notify" => Ok(Arc::new(
NotifyFileWatcher::new(project_root, cells, ignore_specs)
"notify" => {
let watch_included_root_dirs_only = root_config
.parse::<bool>(BuckconfigKeyRef {
section: "project",
property: "watch-included-root-dirs-only",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snake case for buckconfig keys isn't it? Also maybe bike shed it a bit more

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really wish you could grep BuckconfigKeyRef::new and get a big list of all of them to see where you might put a new one and what you might name it. But it ain't so.

})
.buck_error_context(
"Failed to parse project.watch-included-root-dirs-only config",
)?
.unwrap_or(false);
Ok(Arc::new(
NotifyFileWatcher::new(
project_root,
cells,
ignore_specs,
watch_included_root_dirs_only,
)
.buck_error_context("Creating notify file watcher")?,
)),
))
}
"fs_hash_crawler" => Ok(Arc::new(
FsHashCrawler::new(project_root, cells, ignore_specs)
.buck_error_context("Creating fs_crawler file watcher")?,
Expand Down
Loading
Loading