-
Notifications
You must be signed in to change notification settings - Fork 245
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
Error when watching new files with BSD adapter (kqueue) #299
Comments
@tjouan - the BSD adapter is pretty specific and so is this issue - every other adapter watches directories instead of files (sides steps a lot of problems) The fix looks fine and I can merge it. Ideally there would be some unit test for the BSD adapter's logic - just for the sake of coverage and possibly simulating edge cases. I use Linux only and no one out there really uses BSD AFAIK, so if anyone does, any specs that test the adapter's logic would be nice (check out the But since few people use BSD, it's no big deal - just create a PR and let me know if you need a release (e.g. if you need this fix on multiple machines, you need to avoid forks, etc.). I can't test the fix, of course. |
@e2 thanks, you confirm what I was suspecting about other adapters. I agree for test coverage, I initially tried to add one for this I'll create the PR with previously linked commit in a moment, I Thanks for the fast answer and offering a release! Also, about the test suite, I was able to run it a few weeks ago (both
Let me know if you want me to open new issue for this. |
@tjouan - I temporarily switched branches because I needed a patched version of Celluloid to work with. It's fixed now (using Celluloid master). |
@tjouan - don't worry about specs. Just that every once in a while I need to modify something in all the adapters - and it's too easy to break BSD (OSX and Linux have good-enough coverage, Windows is pretty generic, but BSD is "works until someone reports it never did work"). |
@e2, I was able to install and run tests again successfully, thanks. About specs, I recognize the value, and it could also help people like Thanks for your work on listen! |
For future reference, solved with: #301 |
hi,
with #292 we have *BSD support again, which is really great,
thanks a lot :-)
I encounter a very rare issue, only using guard, when a new file will
fail to be watched if it is deleted quickly. I tried to solve it with
the ignore mechanism and increasing
latency
orwait_for_delay
,without success.
While it often happens with VCS or editors, it can also happen
infrequently with simpler and valid use cases if the system is loaded
with many IO operations at the time. My understanding is that the
ignore mechanism only works later, preventing callbacks, after an
error could happen in the adapter. But the BSD adapter needs to search
for new files (walking the filesystem) after receiving directory
change events. It can take some time and fail if the file disappear,
I'm not sure if ignore or timing settings are designed to operate at
this level or circumvent this specific case?
I'm using a workaround (tjouan/listen@55dda3921dfb852e3d0ad035c1bff2cad7210309) since a few
weeks, works well for my use case with guard. Unfortunately, I was not
able to reproduce this in a deterministic way in isolation only with
listen, I'm not sure it's the proper fix, how to add tests for such a
change and if logger usage is correct.
If more info, other changes or a PR would help to solve this, let me
know.
The text was updated successfully, but these errors were encountered: