Renaming a file breaks incremental builds.
jeffschwartz opened this issue · comments
Apparently file watchers, including Chokidar, for whatever reasons cannot do not support a platform generic file rename event.
As stated above, Chokidar doesn't have a "rename" event. When a file is renamed, it fires an unlink event, followed by an add event. This behaviour causes Trio to throw numerous exceptions and mangle the generation of meta data for the fragment reported as having been added when building incrementally.
Therefore, in response to a "delete" event the stats file should be deleted along with the public folder, which will trigger Trio to do a one-off build as if "trio b" was run from the command line, and to generate a new stats.json file that accurately represents the current state of the project.