Make several changes to improve the reliability of --watch
mode
#2444
+153
−68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The import cache now tracks the most recent time it actually loaded
a stylesheet, so that
--watch
mode can invalidate cached dataif it's older than the mtime on disk. This should help catch some
cases where the watcher information doesn't match the filesystem.
Rather than eagerly recompiling as soon as it knows it needs to,
the stylesheet graph now only starts recompiling once it's finished
processing a batch of events. This ensures that any cache
invalidation is finished before the recompilation happens.
The stylesheet graph and import cache now eagerly invalidate all
canonicalize results that could be changed by an added or removed
file, rather than only those that are implicated by the in-memory
ASTs. This avoids issues when the in-memory AST is stale.
Closes #2440