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

Replace libuv #19

Merged
merged 56 commits into from
Oct 26, 2016
Merged

Replace libuv #19

merged 56 commits into from
Oct 26, 2016

Conversation

johnae
Copy link
Owner

@johnae johnae commented Sep 19, 2016

WIP on replacing libuv completely with ljsyscall.

This means that change_handlers are evaluated in order and the
first match is the only one that runs. That way more fine grained
matches can be defined before catch-all ones and only the fine
grained one would run if matching (it being defined before the
catch-all). Setting first_match_only to false would run all matching
handlers.
Earlier, when loading the spookfile and a previous instance of spook
existed, the EventHandlers weren't properly cleaned out and might keep
references around indefinitely. Now, when calling stop on spook (which
is done when reloading the Spookfile and creating a new spook instance),
the EventHandlers are cleared as part of the stop methods. Also, the
EventHandlers table isn't updated for any type of event handler until
the handler is actually started.
@johnae johnae closed this Sep 30, 2016
@johnae johnae reopened this Sep 30, 2016
Catch any errors at top level in main, log them at debug
level.
The watchnr helper is now internal since it was only built for watching
single files. There is now a new helper called "watch_file" that does this
less verbosely (it still uses the internal watchnr).
First args.spookfile, then env spookfile, finally current_dir/Spookfile.
Update the Spookfile with some new logic. It's getting cleaner and might
be something to include with spook. Still undecided.
That was an unnecessary addition. Just have "add" accept more than one argument,
that way it's both shorter and more straightforward to add several notifiers in
one go.
@johnae
Copy link
Owner Author

johnae commented Oct 23, 2016

This is quite close to done now. Perhaps I'm really just being overly careful. Ofc, depending on whether OS X/BSD support is of the utmost importance this is either done or not. For me at this time, OS X and BSD can wait. The main issue on the BSD:s is how kqueue works wrt filesystem changes - that part is quite different from inotify on Linux.

@johnae johnae merged commit f3a3d26 into master Oct 26, 2016
@johnae johnae deleted the replace-libuv branch October 26, 2016 10:36
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.

1 participant