fix: use FSEvent on macos to avoid Too many files#301
Conversation
Greptile SummaryThis PR removes the
Confidence Score: 5/5Safe to merge — single-line dependency feature removal with a well-understood correctness basis and no functional regression. The change is minimal and surgical (one line in Cargo.toml). The technical claim is verifiable: notify v8's FSEvents backend hardcodes No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[File Change on macOS] --> B{Before PR
macos_kqueue feature}
B --> C[kqueue backend
opens 1 fd per watched file]
C --> D[EMFILE: Too many open files]
A --> E{After PR
default macos_fsevent feature}
E --> F[FSEvents backend
kernel-level event stream]
F --> G[kFSEventStreamCreateFlagFileEvents
hardcoded in notify v8]
G --> H[File-level events reported
no fd per file]
H --> I[WatchFiles / RecommendedWatcher
receives EventKind::Modify/Create/Remove]
I --> J[path_matches_patterns checks glob patterns]
J --> K[Daemon restarted if pattern matches]
Reviews (1): Last reviewed commit: "fix: use fsevent on macos to avoid `Too ..." | Re-trigger Greptile |
## 🤖 New release * `pitchfork-cli`: 2.3.0 -> 2.4.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [2.4.0](v2.3.0...v2.4.0) - 2026-04-09 ### Added - add mcp tools ([#311](#311)) - impl container mode ([#305](#305)) ### Fixed - use correct base dir for `.config/pitchfork.toml` case ([#307](#307)) - use FSEvent on macos to avoid `Too many files` ([#301](#301)) ### Other - *(deps)* lock file maintenance ([#310](#310)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk release bookkeeping only: updates version metadata and the changelog, without changing runtime code paths. > > **Overview** > Bumps `pitchfork-cli` from **2.3.0** to **2.4.0** in `Cargo.toml`/`Cargo.lock` and adds the `2.4.0` entry to `CHANGELOG.md` documenting the release contents (MCP tools, container mode, and a few fixes). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b7647a4. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
PR #39 originally introduced macos_kqueue because FSEvents was believed to only report directory-level notifications, which would break
pf watchandpf logs -t. However, in notify v8, the FSEvents implementation hardcodes the kFSEventStreamCreateFlagFileEvents flag, which enables file-level event reporting.Fixes #298.