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

Fix WatchChanges on Mac, fix Dispose, improve Timer usage #799

Merged
merged 1 commit into from
May 17, 2015

Conversation

tpetricek
Copy link
Member

This does a couple of improvements to the watcher:

  • Make it work on Mac/Unix (if you specified full path before, the getRoot function would drop the / from the beginning and treat the path as not rooted - and you'd end up with wrong path)
  • Make it possible to specify just file names without * pattern (e.g. !! "app.fsx" if I want to watch for just a single file)
  • Rather than running the timer all the time, we now only start it when something happens. I also increased the delay a bit (to give the system a bit more time to collect all events related to one action)
  • Also, it now ignores events that happen when the user is reacting to another event (if the user-specified function touches the file - we do not want to get into an infinite loop).

This is mostly triggered by the Suave Dojo (using WatchChanges to live-reload web server), but I think all the changes are useful for the other scenarios I'm aware of.

forki added a commit that referenced this pull request May 17, 2015
Fix WatchChanges on Mac, fix Dispose, improve Timer usage
@forki forki merged commit ec27e1f into fsprojects:master May 17, 2015
@forki
Copy link
Member

forki commented May 17, 2015

cool. thanks

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

Successfully merging this pull request may close these issues.

2 participants