-
Notifications
You must be signed in to change notification settings - Fork 357
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
when multiple tasks watch the same path only one task runs #25
Comments
Hmm that is a fun problem because different targets could have overlapping watched files... so it might not be as simple as comparing matching patterns and grouping tasks. Of course for your example above I'd say just make it one target but I get how this could be an issue for other configs. I'm not sure of the best way to solve this at this time. |
How about running it in the order of tasks that satisfies it? (Implementation detail: for.. in loop respects insertion order.) |
Update: This needs to be fixed in shama/gaze#31 before it can happen here. |
A coworker notified me of this behavior today. We use Gaze via There are two Looks like somewhere deep down a callback is overwritten? @shama does that Test in shama/gaze#31 work? Edit: Wait, how did I get here? |
@jpommerening That test doesn't work but it should. I haven't tested it a bunch but we may only be able to open one descriptor per file. In which case I'll have to restructure gaze to achieve the desired behavior. Where instances access a single queue of changed files and trigger each instance upon matching (which sounds more efficient anyways). |
…ple tasks watch the same path only one task runs
👍 I just ran into this while working on testdouble/lineman, because I'm trying to switch us back to grunt-contrib-watch. I'll take a look at @doctyper's PR |
I see the issue: shama/gaze#31 has been fixed; can this bug be fixed, too, then? Thanks! |
Re: shama/gaze#31 Hey @shama, would you be able to test & bump the latest gaze? I'm eager to get https://github.com/testdouble/lineman back on track with the official watch task. |
Fantastic @shama! I look forward to the next version bump so I can start testing this with lineman. |
Lets say you have
When a change happens only the
jshint
task runs. It seems like the last task wins.My expected behavior is that
watch
(orgaze
) would notice the path already has a file watcher on it and just add another task on to run.The text was updated successfully, but these errors were encountered: