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

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

Merged
merged 2 commits into from
Aug 1, 2024
Merged

Conversation

patak-dev
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.

Copy link

stackblitz bot commented Aug 1, 2024

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

docs/config/server-options.md Outdated Show resolved Hide resolved
Co-authored-by: Bjorn Lu <[email protected]>
@patak-dev patak-dev merged commit 4de659c into main Aug 1, 2024
17 checks passed
@patak-dev patak-dev 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