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

Make several changes to improve the reliability of --watch mode #2444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Nov 26, 2024

  1. The import cache now tracks the most recent time it actually loaded
    a stylesheet, so that --watch mode can invalidate cached data
    if it's older than the mtime on disk. This should help catch some
    cases where the watcher information doesn't match the filesystem.

  2. 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.

  3. 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

@nex3 nex3 requested a review from jathak November 26, 2024 03:07
1. The import cache now tracks the most recent time it actually loaded
   a stylesheet, so that `--watch` mode can invalidate cached data
   if it's older than the mtime on disk. This should help catch some
   cases where the watcher information doesn't match the filesystem.

2. 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.

3. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Watch/poll missing changes when files change
1 participant