-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Emit build error for unknown cache kinds #72832
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
ijjk
added
created-by: Next.js team
PRs by the Next.js team.
tests
Turbopack
Related to Turbopack with Next.js.
type: next
labels
Nov 14, 2024
This stack of pull requests is managed by Graphite. Learn more about stacking. |
unstubbable
changed the title
Rename
Emit build error for unknown cache kinds
Nov 14, 2024
in_cache_file
to file_cache_type
Tests Passed |
unstubbable
force-pushed
the
hl/error-for-unknown-cache-handlers
branch
from
November 14, 2024 22:33
2d51b87
to
301baaf
Compare
unstubbable
force-pushed
the
hl/refactor-server-actions-transforms-errors
branch
from
November 14, 2024 23:04
df920a0
to
5bda6e6
Compare
unstubbable
force-pushed
the
hl/error-for-unknown-cache-handlers
branch
from
November 14, 2024 23:04
301baaf
to
18eaec2
Compare
Here's my suggested rust changes: 10e487a
Otherwise the Rust code LGTM. |
lubieowoce
reviewed
Nov 15, 2024
unstubbable
changed the base branch from
hl/refactor-server-actions-transforms-errors
to
graphite-base/72832
November 15, 2024 12:55
unstubbable
force-pushed
the
graphite-base/72832
branch
from
November 15, 2024 12:55
5bda6e6
to
0f9f442
Compare
unstubbable
force-pushed
the
hl/error-for-unknown-cache-handlers
branch
from
November 15, 2024 12:55
e591b8c
to
bb08f94
Compare
unstubbable
force-pushed
the
hl/error-for-unknown-cache-handlers
branch
from
November 15, 2024 12:56
bb08f94
to
633d34f
Compare
This is now aligned with what the cache wrapper implementation calls it.
unstubbable
force-pushed
the
hl/error-for-unknown-cache-handlers
branch
from
November 16, 2024 10:52
acdafab
to
021b157
Compare
When a `"use cache"` directive with a custom cache kind is used, e.g. `"use cache: custom"`, a cache handler with the same name must be specified in the Next.js config: ```js /** * @type {import('next').NextConfig} */ const nextConfig = { experimental: { dynamicIO: true, cacheHandlers: { custom: require.resolve('path/to/custom/cache/handler'), }, }, } module.exports = nextConfig ``` If this is not the case, we emit a build error with an error message that explains this requirement. When we'll get a docs page for this experimental config, we will add the usual "Read more: ..." hint as well.
Co-authored-by: Janka Uryga <[email protected]>
unstubbable
force-pushed
the
hl/error-for-unknown-cache-handlers
branch
from
November 16, 2024 11:51
021b157
to
2adf9e7
Compare
bgw
approved these changes
Nov 16, 2024
wyattjoh
pushed a commit
that referenced
this pull request
Nov 28, 2024
When a `"use cache"` directive with a custom cache kind is used, e.g. `"use cache: custom"`, a cache handler with the same name must be specified in the Next.js config: ```js /** * @type {import('next').NextConfig} */ const nextConfig = { experimental: { dynamicIO: true, cacheHandlers: { custom: require.resolve('path/to/custom/cache/handler'), }, }, } module.exports = nextConfig ``` If this is not the case, we emit a build error with an error message that explains this requirement. <img width="795" alt="Screenshot 2024-11-14 at 23 30 01" src="https://github.com/user-attachments/assets/bd138c97-608f-42ce-abb2-edb3e44edc3f"> When we'll get a docs page for this experimental config, we will add the usual "Read more: ..." hint as well. --------- Co-authored-by: Benjamin Woodruff <[email protected]> Co-authored-by: Janka Uryga <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
created-by: Next.js team
PRs by the Next.js team.
locked
tests
Turbopack
Related to Turbopack with Next.js.
type: next
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.
When a
"use cache"
directive with a custom cache kind is used, e.g."use cache: custom"
, a cache handler with the same name must be specified in the Next.js config:If this is not the case, we emit a build error with an error message that explains this requirement.
When we'll get a docs page for this experimental config, we will add the usual "Read more: ..." hint as well.