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: Keep watching local changes after suspension #2373

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

taratatach
Copy link
Member

@taratatach taratatach commented Jan 14, 2025

We wanted to stop watching local changes with Chokidar when macOS goes
to sleep and restart when resuming but it appears the unwatch/add
duo of Chokidar methods does not work as expected (i.e. they at least
don't seem to be recursive).

This was preventing the local watcher from doing its job after macOS
resumed from sleep so we'll try not to stop watching the local changes
when going to sleep.
If this has advert effects on the suspension we'll try to find another
way.

Please make sure the following boxes are checked:

  • PR is not too big
  • it improves UX & DX in some way
  • it includes unit tests matching the implementation changes
  • it includes scenarios matching a new behaviour or has been manually tested
  • it includes relevant documentation

@taratatach taratatach self-assigned this Jan 14, 2025
@taratatach taratatach force-pushed the fix/keep-watching-local-changes-after-suspension branch from b36964f to 4d6479a Compare January 14, 2025 15:46
  We wanted to stop watching local changes with Chokidar when macOS goes
  to sleep and restart when resuming but it appears the `unwatch`/`add`
  duo of Chokidar methods does not work as expected (i.e. they at least
  don't seem to be recursive).

  This was preventing the local watcher from doing its job after macOS
  resumed from sleep so we'll try not to stop watching the local changes
  when going to sleep.
  If this has advert effects on the suspension we'll try to find another
  way.
@taratatach taratatach force-pushed the fix/keep-watching-local-changes-after-suspension branch from 4d6479a to 10cd391 Compare January 14, 2025 15:46
@taratatach taratatach changed the title fix: Keep watching local changes after OS suspension fix: Keep watching local changes after suspension Jan 14, 2025
@taratatach taratatach marked this pull request as ready for review January 14, 2025 15:49
@taratatach taratatach merged commit 4a17cbf into master Jan 14, 2025
13 of 16 checks passed
@taratatach taratatach deleted the fix/keep-watching-local-changes-after-suspension branch January 14, 2025 19:11
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.

1 participant