Skip to content

fix: invalidate project file cache and handle watcher race condition #2779

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

Merged
merged 2 commits into from
Jun 19, 2025

Conversation

jasonlyu123
Copy link
Member

#2773

This delays the file reading in svelte-check --watch until we're sure the new file is a project file. I still added a file existence check before reading, but it might be more of a fail-safe because the chance of it being deleted at this point is much smaller.

While checking this, I also found that the new file watch is broken because it now caches the tsconfig parsing result. So I changed the "read the config again" logic to the one language server used to invalidate the project files cache.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dummdidumm dummdidumm merged commit 5493844 into sveltejs:master Jun 19, 2025
3 checks passed
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.

2 participants