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

Polling instead of inotify #40

Open
trevex opened this issue Mar 9, 2017 · 4 comments
Open

Polling instead of inotify #40

trevex opened this issue Mar 9, 2017 · 4 comments

Comments

@trevex
Copy link

trevex commented Mar 9, 2017

I am currently using reflex to recompile go application when something changes. Unfortunately I noticed reflex is not working properly when inside a VM with filesystems like vboxsf. Is there any chance that reflex will support somethink like force-polling or polling as a fallback?

@gamunu
Copy link

gamunu commented Mar 14, 2017

I'm having the same issue on my Vagrant environment. I've found an issue opened for fsnotify fsnotify/fsnotify#9.
https://github.com/radovskyb/watcher this is a GO package for watching for files or directory changes without using inotify.

@cespare
Copy link
Owner

cespare commented May 9, 2018

If we implemented polling, how would we detect that the normal notification method or the platform doesn't work and that we should poll instead?

@tylersampson
Copy link

tylersampson commented Jun 14, 2019

I can confirm the same issue when using Docker for Windows.

If we implemented polling, how would we detect that the normal notification method or the platform doesn't work and that we should poll instead?

I think it should be by ways of configuration instead of automatic detection. Similar to https://webpack.js.org/configuration/dev-server/#devserverwatchoptions-
So perhaps another command line option:

-p, --poll=1000
    Turn on polling to watch for file changes. Default uses file system notification.

@AgentCosmic
Copy link

This issue has pained me for a long time. I tried the polling method but it gets slow when the project is big. I finally decided to write my own tool to overcome this problem. It has a similar design to reflex. Hope this will help you guys: https://github.com/AgentCosmic/xnotify

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

No branches or pull requests

5 participants