-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 89: Adding new sync_method - fsevents
Issue has been detailed at: #89 Currently sync polls directories and files for any changes and recompile the changed files and loads them. When sync starts monitoring more projects under one umbrella CPU can get overwhelmed with this polling. it will be good if sync looks for file system changes notifications and act upon them. There is a project synrc/fs which provides filesystem change events. This supports Mac, Windows and Linux platforms. This commit integrates sync with fs. Here is what it does: 1. Added a new app evnironment variable, sync_method. User can specifiy this to scanner or fsevents. By default it will be scanner, which would retain current behavior. If user specifies fsevents, new logic kicks in. 2. discover_src_dirs, will discover all source directories as requested by user. and starts fs process for monited directories. 3. When a source file or a header file changes, sync gets {fs,file_event} event. And it will handle the changed files a second later so that it can suppress/collect all events on a file. 4. Make sure no timers are active in stable state. Signed-off-by: Vasu Dasari <[email protected]>
- Loading branch information
1 parent
9106be7
commit 3969698
Showing
3 changed files
with
158 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
{erl_opts, [debug_info]}. | ||
|
||
{deps, [ | ||
{fs, "6.1.1"} | ||
]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters