Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a potential race condition with watcher cleanup but that was not the source of the flakiness.
We discovered that if Parcel watcher was subscribed to a directory and a child directory it could result in events not firing — even for different directories. Oddly, this only seemed to happen if we:
compile(…).build(…)However, if we hardcoded the list of candidates passed to
build(…)regardless of whether or not Oxide scanned the filesystem for candidates the issue did not occur (though maybe it was just less reproducible — this was after all a VERY flaky test).Given that watching children of an already watched directory is doing unnecessary work, we decided to cleanup the list of watched directories such that this does not happen. It appears to fix the flakiness but we'll want to keep an eye on it in case the flakiness returns.