turbo
d9d1b3a9 - feat(turborepo): Using file hashing for package watching (#8104)

Commit
1 year ago
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
Author
Parents
Loading