Dev server constantly restarting on Windows in v3.30.0
The problem described in #1028 , introduced in v3.26.0 by #913, and fixed in v3.29.0 by #1060, has returned in v3.30.0.
I believe the regression was introduced by #1105, which introduced the new ForkPool. The issue appears to be that the FileChangeTracker, which was introduced to address the problem originally, is re-created with each new fork. This class has an mtimes cache of previously-known file update times, and so must persist across restarts to be useful. (Or, perhaps that cache just needs to be populated at the time the FileChangeTracker is created? I'm a bit unclear how it was working previously.)
Tagging @danielroe, as the author of all the mentioned changes.
oh dear - thanks for letting me know 😆
I took a stab at fixing this with #1137, and it seems to be working well on my Windows system.
I think the lifetime of the FileChangeTrackers previously persisted across restarts, and it eventually got populated with mtimes for the relevant files - I do recall seeing a couple of 'mystery' restarts shortly after dev server start, but it quieted down after a bit. With FileChangeTrackers now being re-instantiated on each restart, that doesn't have a chance to happen, and it just keeps restarting.
My fix is to prime the FileChangeTracker with the starting mtimes of tracked files so that the first change notification won't always trigger a reload/restart.