Offer watchFile as commandline argument #23

Closed
wants to merge 6 commits into
from

Conversation

Projects
None yet
3 participants
@cybear
Contributor

cybear commented Mar 16, 2012

fs.watch is quite buggy on some combinations of node and platforms (for me 0.6.12 on Darwin).

What happens to me is that I only get notified the first time a file gets changed, then never again. Apparently the node blog says that fs.watch on OS X should be "fixed" by 0.6.12 - http://blog.nodejs.org/2012/03/02/version-0-6-12-stable/ - but I am still experiencing the same problems.

I added a commandline argument to force using watchFile, which works fine for me.

@papandreou

This comment has been minimized.

Show comment Hide comment
@papandreou

papandreou Mar 17, 2012

Member

Thanks! Squashed into one commit and applied in 69c5a19.

Member

papandreou commented Mar 17, 2012

Thanks! Squashed into one commit and applied in 69c5a19.

@papandreou papandreou closed this Mar 17, 2012

papandreou added a commit that referenced this pull request Mar 17, 2012

installLiveCssFileWatcherInServer: Watch the containing directory ins…
…tead of the file when using fs.watch.

Hopefully this resolves some of the weirdness we've seen (see #23).
@papandreou

This comment has been minimized.

Show comment Hide comment
@papandreou

papandreou Mar 17, 2012

Member

@cybear: There are some fs.watch-related changes in 0.0.21 that may resolve your original issue. Could you please check?

Member

papandreou commented Mar 17, 2012

@cybear: There are some fs.watch-related changes in 0.0.21 that may resolve your original issue. Could you please check?

@cybear

This comment has been minimized.

Show comment Hide comment
@cybear

cybear Mar 19, 2012

Contributor

OK, I've tried it now.
0.0.22 results in the exactly same bug to me.
First time I save a file, the event comes. Second time (and onward), no event.
The commandline switch helps for me though, so I'm glad it's there!

Contributor

cybear commented Mar 19, 2012

OK, I've tried it now.
0.0.22 results in the exactly same bug to me.
First time I save a file, the event comes. Second time (and onward), no event.
The commandline switch helps for me though, so I'm glad it's there!

@cybear

This comment has been minimized.

Show comment Hide comment
@cybear

cybear Mar 19, 2012

Contributor

Maybe I should move this into an issue?

Contributor

cybear commented Mar 19, 2012

Maybe I should move this into an issue?

@simonz05

This comment has been minimized.

Show comment Hide comment
@simonz05

simonz05 Mar 19, 2012

Is this an issue with livestyle or nodejs filesystem watch? In case of the latter, I'd suggest filing an issue on the nodejs tracker as well. It's probably good to isolate the problem as well anyway, so that a better test case can be created and added to livestyle

Is this an issue with livestyle or nodejs filesystem watch? In case of the latter, I'd suggest filing an issue on the nodejs tracker as well. It's probably good to isolate the problem as well anyway, so that a better test case can be created and added to livestyle

@papandreou

This comment has been minimized.

Show comment Hide comment
@papandreou

papandreou Mar 19, 2012

Member

@cybear: Bummer, I'll try to get hold of a mac so I can debug the issue properly.

@simonz05: According to http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener fs.watch is still considered unstable and they're listing a bunch of caveats. It's probably safe to assume that this is a known bug.

Member

papandreou commented Mar 19, 2012

@cybear: Bummer, I'll try to get hold of a mac so I can debug the issue properly.

@simonz05: According to http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener fs.watch is still considered unstable and they're listing a bunch of caveats. It's probably safe to assume that this is a known bug.

@cybear

This comment has been minimized.

Show comment Hide comment
@cybear

cybear Mar 20, 2012

Contributor

@papandreou @simonz05 I see now that there's already an issue open on the node project: joyent/node#1986

Contributor

cybear commented Mar 20, 2012

@papandreou @simonz05 I see now that there's already an issue open on the node project: joyent/node#1986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment