Separate server HMR entries from VersionedContentMap - #97903
Conversation
Stats from current PR🟢 3 improvements
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URLCommit: a301662 |
Failing test suitesCommit: a301662 | About building and testing Next.js
Expand output● cache-indicator-partial-prefetching › cache after session data triggers cold cache indicator ● cache-indicator-partial-prefetching › cache after link data › does not trigger cold cache indicator without prefetch={true} ● cache-indicator-partial-prefetching › shows the Cold cache badge on a cold runtime-prefetch navigation to a private-cache route, not on a warm one
Expand output● hmr-app-and-pages › should do HMR when app router and pages router have shared CSS
Expand output● server-hmr › metadata route hmr › reflects manifest dep changes on fetch/refresh ● server-hmr › metadata route hmr › does not re-evaluate an unmodified dep when manifest changes ● server-hmr › route handler hmr › reflects route handler changes on fetch/refresh ● server-hmr › route handler hmr › does not re-evaluate an unmodified dependency when route changes
Expand output● turbopack-ignore-issue › with turbopack.ignoreIssue config › should suppress ignored server component warning from cli output ● turbopack-ignore-issue › with turbopack.ignoreIssue config › should suppress ignored server component error from error overlay ● turbopack-ignore-issue › with turbopack.ignoreIssue config › should suppress ignored route handler warning from cli output ● turbopack-ignore-issue › with turbopack.ignoreIssue config › should suppress ignored route handler error from cli output ● turbopack-ignore-issue › with turbopack.ignoreIssue config › should still show issues for pages without ignore rules
Expand output● turbopack worker thread error cleanup › terminates a loader worker after an evaluation error
Expand output● global-not-found - basic › should ssr global-not-found for 404 ● global-not-found - basic › should render not-found boundary when calling notFound() in a page
Expand output● global-not-found - no-root-layout › should ssr global-not-found for 404
Expand output● app dir - navigation › hash › should scroll to the specified hash ● app dir - navigation › hash › should not scroll to hash when scroll={false} is set ● app dir - navigation › hash-with-scroll-offset › should scroll to the specified hash ● app dir - navigation › hash-link-back-to-same-page › should scroll to the specified hash ● app dir - navigation › relative hashes and queries › should work with a hash-only href ● app dir - navigation › relative hashes and queries › should work with a hash-only ● app dir - navigation › relative hashes and queries › should work with a query-only href ● app dir - navigation › relative hashes and queries › should work with both relative hashes and queries ● app dir - navigation › cross-pathname Link then same-pathname hash change › should replace (not concatenate) the hash when triggers the same-pathname hash change ● app dir - navigation › not-found › should trigger not-found in a server component ● app dir - navigation › not-found › should trigger not-found in a client component ● app dir - navigation › not-found › should trigger not-found client-side ● app dir - navigation › not-found › should trigger not-found while streaming ● app dir - navigation › redirect › components › should redirect in a server component ● app dir - navigation › redirect › components › should redirect in a client component ● app dir - navigation › redirect › components › should redirect client-side ● app dir - navigation › redirect › components › should redirect to external url ● app dir - navigation › redirect › components › should redirect to external url, initiating only once ● app dir - navigation › redirect › components › should only trigger the redirect once (/redirect/servercomponent) ● app dir - navigation › redirect › components › should only trigger the redirect once (redirect/redirect-with-loading) ● app dir - navigation › redirect › next.config.js redirects › should redirect from next.config.js ... truncated ...
Expand output● searchparams-reuse-loading › should re-use the prefetched loading state when navigating to a new searchParam value ● searchparams-reuse-loading › should properly render root page with searchParams when prefetch is aliased ... truncated to fit in one GitHub comment ... |
ea61a37 to
fb9e7c3
Compare
fb9e7c3 to
a301662
Compare
Summary
Move server HMR chunk-list ownership out of
VersionedContentMapand into a dedicatedServerHmrEntryMap.VersionedContentMapno longer scans all emitted assets to discover server HMR chunk lists or filters them for each pull. Instead, endpoints register their chunk entry lists under the route entry key when they are written. Server HMR snapshots then read only the chunk lists owned by that route.This keeps
VersionedContentMapfocused on asset lookup and emission, while server HMR state is compartmentalized by route. It also removes the project-wide chunk-list scan and the associated path filtering from the update path.The endpoint and native binding changes pass the route entry key through to the server HMR pull without changing the update wire format.
Verification
cargo check -p next-api -p next-napi-bindingscargo fmt --all -- --check