Possibly fix EMFILE issue on macos
We have this weird hack to allow recursive file watching on Linux, but I don't think the condition was being properly hit and thus a watcher was setup for every single directory which macos doesn't like
MODIFY
packages/@romejs/core/master/fs/MemoryFileSystem.ts
packages/@romejs/core/master/fs/MemoryFileSystem.ts
@@ -91,8 +91,10 @@ async function createRegularWatcher(
return;
}
- // All of this madness is because Node doesn't support recursive watching on Linux
- if (process.platform !== 'linux' && folderPath.equal(projectFolderPath)) {
+ if (process.platform === 'linux') {
+ // Node on Linux doesn't support recursive directory watching so we need an fs.watch for every directory...
+ } else if (!folderPath.equal(projectFolderPath)) {
+ // If we're on any other platform then only watch the root project folder
return;
}

Possibly fix EMFILE issue on macos

We have this weird hack to allow recursive file watching on Linux, but I don't think the condition was being properly hit and thus a watcher was setup for every single directory which macos doesn't like