-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
fix: opt-in server.fs.cachedChecks #17807
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run & review this pull request in StackBlitz Codeflow. |
bluwy
reviewed
Aug 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some docs edit. A small thing, but maybe we also want to set the default here as false:
vite/packages/vite/src/node/server/index.ts
Lines 210 to 216 in 1025bb6
/** | |
* Enable caching of fs calls. It is enabled by default if no custom watch ignored patterns are provided. | |
* | |
* @experimental | |
* @default undefined | |
*/ | |
cachedChecks?: boolean |
Co-authored-by: Bjorn Lu <[email protected]>
bluwy
approved these changes
Aug 1, 2024
This was referenced Aug 8, 2024
IWANABETHATGUY
pushed a commit
to rolldown/rolldown
that referenced
this pull request
Aug 11, 2024
### Description - base branch #1863 Vitest v2 update is failing in #1863, but accompanying it with vite v5.4 should fix it (see Vite PR for details vitejs/vite#17807).
hi-ogawa
added a commit
to vitejs/vite-plugin-react
that referenced
this pull request
Aug 13, 2024
hi-ogawa
added a commit
to vitejs/vite-plugin-react
that referenced
this pull request
Aug 13, 2024
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Make
server.fs.cachedChecks
false by default. Even if technically this issue #17760 is a rare edge case in the way current frameworks and tools are implemented (as we have been using cachedChecks for a while now), it should work correctly and we don't have a good fix for it at this point.We should move to opt-in cached checks for now. In some large apps, specially on Windows, it would still be a good idea to enable it but we will let that to the user. Node has been working on improving fs access so we're discussing a potential deprecation of this cache. It will also not be share by access by rolldown later on if we keep it.
We can keep #17760 open for now if we'd like to explore a solution. If we can't find a way to fix it, I'm leaning towards removal of the cache.