Skip to content

Make {watcher} a required dependency for autoreload#4403

Merged
cpsievert merged 2 commits into
mainfrom
watcher-import
Jun 24, 2026
Merged

Make {watcher} a required dependency for autoreload#4403
cpsievert merged 2 commits into
mainfrom
watcher-import

Conversation

@shikokuchuo

Copy link
Copy Markdown
Member

Summary

Moves {watcher} from Suggests to Imports and uses it unconditionally for autoreload. Removes the legacy polling-based file watcher.

Changes

  • DESCRIPTION: watcherImports, with (>= 0.2.0).
  • R/shinyapp.R (initAutoReloadMonitor()): drop the is_installed("watcher") branch, the legacy observe()/invalidateLater() poller, and the shiny.autoreload.legacy_warning option. Return invisible(watcher$stop) so cleanup flows through the existing onStop → monitorHandle() path.
  • R/shiny-options.R / man/shinyOptions.Rd: simplify the shiny.autoreload option docs now that watcher is the sole path (drop the historical "no longer polls"/"no longer expensive" hedging).
  • NEWS.md: note the dependency change.

Compatibility

  • shiny.autoreload.interval / .pattern unchanged (interval still passed as latency, default 250ms).
  • shiny.autoreload.legacy_warning removed; silently ignored if set.

Move {watcher} from Suggests to Imports and use it unconditionally for
autoreload file watching, removing the legacy polling-based fallback.
@shikokuchuo

Copy link
Copy Markdown
Member Author

@cpsievert The original intention of #4185 was to enable this by default, and as watcher now uses R's standard build toolchain, this should address any lingering source installation concerns. End of the day, I think this is a good affordance for Shiny to provide.

@cpsievert cpsievert merged commit 107747a into main Jun 24, 2026
12 checks passed
@cpsievert

Copy link
Copy Markdown
Collaborator

Thanks!

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.

2 participants