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

Renaming a file breaks incremental builds. #94

Closed
jeffschwartz opened this issue Jan 12, 2020 · 0 comments
Closed

Renaming a file breaks incremental builds. #94

jeffschwartz opened this issue Jan 12, 2020 · 0 comments
Assignees
Labels
bug Something isn't working generator related Issue is generator related incremental build related Issue is incremental build related metadata related Issue is metadata related
Milestone

Comments

@jeffschwartz
Copy link
Contributor

jeffschwartz commented Jan 12, 2020

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.

@jeffschwartz jeffschwartz added bug Something isn't working generator related Issue is generator related incremental build related Issue is incremental build related metadata related Issue is metadata related labels Jan 12, 2020
@jeffschwartz jeffschwartz added this to the v3.0.0 milestone Jan 12, 2020
@jeffschwartz jeffschwartz self-assigned this Jan 12, 2020
jeffschwartz added a commit that referenced this issue Jan 12, 2020
public folder in response to Chokidar's unlink
event when building incrementally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working generator related Issue is generator related incremental build related Issue is incremental build related metadata related Issue is metadata related
Projects
None yet
Development

No branches or pull requests

1 participant