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

Fix to #508, #494...: some grunt tasks not triggered when spawn:false #509

Closed
wants to merge 2 commits into from
Closed

Conversation

bchabrier
Copy link

@bchabrier bchabrier commented May 13, 2016

The issues described in the #508, #494 and some others, occur when spawn is set to false.

In that case, the watchers are deleted and then re-created once the triggered tasks have completed their execution.

The re-creation of the watchers is a good idea, since this makes sure to take into account any change that could have happened in the file system (e.g. new repositories) or in the watch options while the triggered tasks were run.

However, when the triggered tasks make some changes to the watched files, it might happen that the changes are not detected because they happen just between the time the watchers are deleted and the time the new watchers are created: at the exact moment the changes are done to the file system, there is no watcher listening to the change. Hence, watch doesn't trigger tasks.

The fix consists in doing the deletion of the previous watchers once the watchers have been recreated. This way, there is always at least one watcher listening to file system changes.

@bchabrier bchabrier changed the title Fix to #508, #494...: somegrunt tasks not triggered when spawn:false Fix to #508, #494, #473...: somegrunt tasks not triggered when spawn:false May 13, 2016
@bchabrier bchabrier changed the title Fix to #508, #494, #473...: somegrunt tasks not triggered when spawn:false Fix to #508, #494...: some grunt tasks not triggered when spawn:false May 13, 2016
@bchabrier
Copy link
Author

It seems my fix doesn't work every time. There are still some cases were a change to the file system done by a task in nospawn mode is not detected by watch.

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

Successfully merging this pull request may close these issues.

None yet

1 participant