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

CHOKIDAR_USEPOLLING and options.usePolling inconsistent on macOS #1251

Open
markphilpot opened this issue Nov 19, 2022 · 1 comment · May be fixed by #1252
Open

CHOKIDAR_USEPOLLING and options.usePolling inconsistent on macOS #1251

markphilpot opened this issue Nov 19, 2022 · 1 comment · May be fixed by #1252
Labels

Comments

@markphilpot
Copy link

On macOS, when the option usePolling is set to true, useFsEvents is set to false (as a side effect).

When the env variable CHOKIDAR_USEPOLLING=1 is set, it sets usePolling to true, but leaves useFsEvents as true.

Currently, I'm running into an issue in gatsby's source-filesystem plugin in how chokidar deals with hard links. I specifically need usePolling to be true and useFsEvents to be false. (See gatsbyjs/gatsby#36877 and gatsbyjs/gatsby#36975)

The easiest solution would be to add a CHOKIDAR_USEFSEVENTS env variable so I can correctly emulate the behavior when using the options.

Another option would be to mimic the options behavior (usePolling=true, useFsEvents=false) when using the env variable. The danger here would be anyone using the existing behavior.

If I can get some direction on which direction is better I can submit a PR that does it.

@paulmillr
Copy link
Owner

Another option would be to mimic the options behavior (usePolling=true, useFsEvents=false) when using the env variable. The danger here would be anyone using the existing behavior.

that should be ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants