-
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
Commits on Nov 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c247d3b - Browse repository at this point
Copy the full SHA c247d3bView commit details -
Rename "cache type" to "cache kind"
This is now aligned with what the cache wrapper implementation calls it.
Configuration menu - View commit details
-
Copy full SHA for 2cec412 - Browse repository at this point
Copy the full SHA 2cec412View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74d9000 - Browse repository at this point
Copy the full SHA 74d9000View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22b8dc4 - Browse repository at this point
Copy the full SHA 22b8dc4View commit details -
Emit build error for unknown cache kinds
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.
Configuration menu - View commit details
-
Copy full SHA for dddf0ca - Browse repository at this point
Copy the full SHA dddf0caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d80148 - Browse repository at this point
Copy the full SHA 6d80148View commit details -
Configuration menu - View commit details
-
Copy full SHA for b86a957 - Browse repository at this point
Copy the full SHA b86a957View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0517ec - Browse repository at this point
Copy the full SHA f0517ecView commit details -
Use
"experimental.cacheHandlers"
in error messageCo-authored-by: Janka Uryga <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 633d34f - Browse repository at this point
Copy the full SHA 633d34fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f2052a4 - Browse repository at this point
Copy the full SHA f2052a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for acdafab - Browse repository at this point
Copy the full SHA acdafabView commit details
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.