tup icon indicating copy to clipboard operation
tup copied to clipboard

Issues with tup monitor on OSX

Open tristanoneil opened this issue 13 years ago • 5 comments

Does tup monitor work on OSX? I'm able to run tup upd and my Tupfile runs as expected but a tup process isn't even started when I run tup monitor -a. I installed tup via homebrew and am running 10.8.4.

tristanoneil avatar Jul 26 '13 21:07 tristanoneil

I just ran into this as well. Digging further it just looks like it's not implemented for anything other than linux systems with inotify.

It really seems like it would be pretty simple to not show the 'monitor' command in the help if you're on a system that doesn't support it, instead of doing nothing and leaving the user wondering.

kurige avatar Jul 27 '13 16:07 kurige

On Sat, Jul 27, 2013 at 12:53 PM, Christopher Gateley < [email protected]> wrote:

I just ran into this as well. Digging further it just looks like it's not implemented for anything other than linux systems with inotify.

It really seems like it would be pretty simple to not show the 'monitor' command in the help if you're on a system that doesn't support it, instead of doing nothing and leaving the user wondering.

Correct, it is not implemented on OSX or Windows yet.

I've updated tup to print an error message when running 'tup monitor' on an unsupported system, and changed the man page to clarify that it is currently Linux-only.

Are the scan-times for your projects large enough that you need to use the file monitor? (Ie: what does 'time tup scan' report on a hot disk cache?)

-Mike

gittup avatar Jul 31 '13 18:07 gittup

Thanks.

I think the help text (from running tup or tup help) could use some work in general. Just from looking at that it looks like the only options are tup upd and tup monitor, although, to be fair, it does tell me to read the man page.

I did read through the man page, but have never used scan because it sounds like it's subsumed by monitor and upd. I don't need to run monitor, but it is a major convenience.

I'm taking a stab at adding monitor support to Mac OS X using FSEvent API.

kurige avatar Jul 31 '13 18:07 kurige

On Wed, Jul 31, 2013 at 2:50 PM, Christopher Gateley < [email protected]> wrote:

Thanks.

I think the help text (from running tup or tup help) could use some work in general. Just from looking at that it looks like the only options are tup upd and tup monitor, although, to be fair, it does tell me to read the man page.

Just running 'tup' should show only 'tup init' and 'tup upd' - the monitor is only listed as a secondary command in the manual because it isn't strictly necessary. I don't think there is any 'tup help' - can you clarify what you're looking at?

I did read through the man page, but have never used scan because it sounds like it's subsumed by monitor and upd. I don't need to run monitor, but it is a major convenience.

Sorry, I should have explained - 'tup scan' is really just the first step of 'tup upd', which is the only thing that changes when running the monitor. You don't usually need to run it manually, since 'upd' scans automatically if the monitor is not running. I was just suggesting to run it since that is an easy way to benchmark about how much time you save by running a monitor.

I'm taking a stab at adding monitor support to Mac OS X using FSEvent API.

Ok, sounds cool :). Though it may also be worth looking at a cross-platform library so they can all share the same monitor implementation. I'm not sure why I didn't do that initially...

Also keep in mind I need a contributor license agreement on file before I can accept changes to tup: http://gittup.org/tup/icla.txt

Thanks, -Mike

gittup avatar Jul 31 '13 19:07 gittup

@kurige did you have any luck with your attempt to add FSEvent support?

ashleyh avatar Dec 04 '13 18:12 ashleyh