Stale cached JavaScript output after dependency file change in figwheel-main watcher
0 reputation · 09 Aug 2022, 01:12 UTC
Goal: Determine why figwheel-main’s file‑watcher fails to trigger recompilation when a dependency file is modified, resulting in stale cached JavaScript output when using :optimizations :none.
Constraints: The watcher relies on file modification timestamps; system clock adjustments or touching a file without changing its content can leave the cache unchanged. It is unclear whether figwheel-main supplements timestamps with content‑based checks or if additional configuration (e.g., :watch-dirs, :cache-dir) can guarantee detection of genuine changes.
Uncertainty: Whether the current implementation invalidates the cache only on timestamp changes, and how to configure reliable invalidation when timestamps are not trustworthy.
Specific questions: Does figwheel-main’s watcher depend solely on modification times for dependency files? Can adjusting :watch-dirs or :cache-dir alter this behavior? What configuration or workflow ensures recompilation when timestamps cannot be trusted?