Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(turborepo): Using file hashing for package watching (#8104)
### Description We leverage the file hash watcher to make watch mode more stable. Basically, once we get a list of changed packages, we query the file hash watcher to see if there are file hashes available. If so, we check if we've seen these file hashes before. If they are, then we don't re-run. This does have some caveats. For one, file hashes are not exactly correct for whether a task should be re-run. We really should be checking task hashes, but that will require more daemon infrastructure. Also files are most likely the only changes a user will make with watch mode (will they edit env vars? Probably not), so this is good enough. Also, this will only work on the *second* run, since we need to get the file hash and store it. Maybe even the third if hashing takes too long to get. ### Testing Instructions I tested on the next.js repo. You can confirm the behavior by looking at the daemon logs and seeing that we don't get a re-run when running `touch foo` multiple times, since the file has the same content. Closes TURBO-3010
- Loading branch information
1 parent
7059c03
commit d9d1b3a
Showing
3 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters