-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Open
unstubbable
wants to merge
11
commits into
canary
Choose a base branch
from
hl/error-for-unknown-cache-handlers
base: canary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+393
−82
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
This is now aligned with what the cache wrapper implementation calls it.
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.
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
Co-authored-by: Janka Uryga <[email protected]>
unstubbable
force-pushed
the
hl/error-for-unknown-cache-handlers
branch
from
November 15, 2024 12:56
bb08f94
to
633d34f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
created-by: Next.js team
PRs by the Next.js team.
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.