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

New files not automatically watched. #3

Open
jhelwig opened this issue Oct 24, 2009 · 23 comments
Open

New files not automatically watched. #3

jhelwig opened this issue Oct 24, 2009 · 23 comments

Comments

@jhelwig
Copy link

jhelwig commented Oct 24, 2009

New files are not automatically picked up to be watched. watchr must be stopped & re-started for saved changes in new files to match a watched pattern.

Ubuntu w/ ext3 fs
watchr 0.5.7
rev 0.3.1

Not really a big deal. autotest has the same problem.

@rsanheim
Copy link

+1 would also like to be notified if this gets fixed.

@mynyml
Copy link
Owner

mynyml commented Nov 6, 2009

Detecting new files is currently not supported. This is mainly due to how rev works in the backend. It's pretty much the #1 feature I want to implement though, so it will be in there soon-(ish). There are various ways to go about it though and I still have to see which one's the most appropriate.

I'll leave this issue open until the feature gets added.

@mynyml
Copy link
Owner

mynyml commented Nov 6, 2009

@jhelwig btw, as a temporary workaround there are two options:

  • touch/save the script file (it will rescan for files matching the patterns)
  • add a signal handler in your script that touches the script file for you. you can use the #path method for that (system "touch #{path}").

@jhelwig
Copy link
Author

jhelwig commented Nov 6, 2009

Steven Parkes has a fork of watchr that uses EventMachine to get this functionality instead of rev. Last I spoke with him, I got the impression that it was functional, but there was still some work that he wanted to do.

http://github.com/smparkes/watchr

@mynyml
Copy link
Owner

mynyml commented Nov 6, 2009

Thanks. Yeah I'm aware of his fork, playing with it atm actually. I've tried having an EM backend twice before (one attempt is still in a branch http://github.com/mynyml/watchr/blob/em/lib/watchr/event_handlers/unix.rb) so i'm pretty interested in his approach.

One other solution I was considering is using inotify and kqueue directly (the earliest version of watchr used inotify directly http://github.com/mynyml/watchr/blob/f0a0b3045f4458cb973eb708cce3d4b3905ce2fe/lib/watchr/event_handlers/linux.rb) instead of the rev wrapper, since it allows more flexibility, including watching directories. That power would come with potential maintenance headaches though, so at this point smparkes's solution seems to be the most interesting one.

@graaff
Copy link

graaff commented Dec 10, 2009

Touching or reloading the script isn't really an option for me since that throws away the state I've been collecting up to that point. Would be nice to have this solved in rev.

@anlek
Copy link

anlek commented Jul 20, 2010

Any news on this front?

@karl
Copy link

karl commented Oct 3, 2010

+1 for this as well.

I'm currently using a custom ruby project to run all my tests, linting, and compilation. I would love to abandon it in favour of watchr, but I can't without the ability to detect new files.

@paneq
Copy link

paneq commented May 22, 2011

Did anything change ?

@jmazzi
Copy link

jmazzi commented Jul 12, 2011

Has there been any progress with monitoring for new files?

@anlek
Copy link

anlek commented Jul 12, 2011

I just started using Guard.

@ropez
Copy link

ropez commented Sep 26, 2011

+1

@installero
Copy link

still doesn't care about new files

@wulftone
Copy link

+1

1 similar comment
@mikebranderhorst
Copy link

+1

@vkovalskiy
Copy link

+1 need it

@shaggyone
Copy link

Me too!

@samsamm777
Copy link

+1

@eshilts
Copy link

eshilts commented Aug 30, 2012

+1, bummer this was never implemented

@anbiniyar
Copy link

+1 need it desperately

@samsamm777
Copy link

use Guard instead.

@zw963
Copy link

zw963 commented Jan 7, 2014

It's seem like still not supported by watchr.

@szhu
Copy link

szhu commented May 11, 2015

Touching the script doesn't cause new files to be detected for me. Can someone confirm or deny this?

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