Skip to content

fix: opt-in server.fs.cachedChecks#17807

Merged
patak-cat merged 2 commits intomainfrom
fix/opt-in-fs-cached-checks
Aug 1, 2024
Merged

fix: opt-in server.fs.cachedChecks#17807
patak-cat merged 2 commits intomainfrom
fix/opt-in-fs-cached-checks

Conversation

@patak-cat
Copy link
Member

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.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Member

@bluwy bluwy left a 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:

/**
* 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 <bjornlu.dev@gmail.com>
@patak-cat patak-cat merged commit 4de659c into main Aug 1, 2024
@patak-cat patak-cat deleted the fix/opt-in-fs-cached-checks branch August 1, 2024 15:03
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
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