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

Comments

Projects
None yet
@jhelwig

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

This comment has been minimized.

Show comment
Hide comment
@rsanheim

rsanheim Oct 26, 2009

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

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

@mynyml

This comment has been minimized.

Show comment
Hide comment
@mynyml

mynyml Nov 6, 2009

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@mynyml

mynyml Nov 6, 2009

Owner

@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}").
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

This comment has been minimized.

Show comment
Hide comment
@jhelwig

jhelwig 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

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

This comment has been minimized.

Show comment
Hide comment
@mynyml

mynyml Nov 6, 2009

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@graaff

graaff 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.

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

This comment has been minimized.

Show comment
Hide comment
@anlek

anlek Jul 20, 2010

Any news on this front?

anlek commented Jul 20, 2010

Any news on this front?

@karl

This comment has been minimized.

Show comment
Hide comment
@karl

karl 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.

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

This comment has been minimized.

Show comment
Hide comment
@paneq

paneq May 22, 2011

Did anything change ?

paneq commented May 22, 2011

Did anything change ?

@jmazzi

This comment has been minimized.

Show comment
Hide comment
@jmazzi

jmazzi Jul 12, 2011

Has there been any progress with monitoring for new files?

jmazzi commented Jul 12, 2011

Has there been any progress with monitoring for new files?

@anlek

This comment has been minimized.

Show comment
Hide comment
@anlek

anlek Jul 12, 2011

I just started using Guard.

anlek commented Jul 12, 2011

I just started using Guard.

@ropez

This comment has been minimized.

Show comment
Hide comment

ropez commented Sep 26, 2011

+1

@installero

This comment has been minimized.

Show comment
Hide comment
@installero

installero Sep 30, 2011

still doesn't care about new files

still doesn't care about new files

@wulftone

This comment has been minimized.

Show comment
Hide comment

+1

@mikebranderhorst

This comment has been minimized.

Show comment
Hide comment
@vkovalskiy

This comment has been minimized.

Show comment
Hide comment

+1 need it

@shaggyone

This comment has been minimized.

Show comment
Hide comment

Me too!

@samsamm777

This comment has been minimized.

Show comment
Hide comment

+1

@eshilts

This comment has been minimized.

Show comment
Hide comment
@eshilts

eshilts Aug 30, 2012

+1, bummer this was never implemented

eshilts commented Aug 30, 2012

+1, bummer this was never implemented

@anbiniyar

This comment has been minimized.

Show comment
Hide comment
@anbiniyar

anbiniyar Oct 12, 2012

+1 need it desperately

+1 need it desperately

@samsamm777

This comment has been minimized.

Show comment
Hide comment
@samsamm777

samsamm777 Dec 14, 2012

use Guard instead.

use Guard instead.

@zw963

This comment has been minimized.

Show comment
Hide comment
@zw963

zw963 Jan 7, 2014

It's seem like still not supported by watchr.

zw963 commented Jan 7, 2014

It's seem like still not supported by watchr.

@szhu

This comment has been minimized.

Show comment
Hide comment
@szhu

szhu May 11, 2015

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

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