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

Add isDevfallback to cache name to create a separate cache for the fallback compiler #30227

Merged
merged 2 commits into from Oct 24, 2021

Conversation

timneutkens
Copy link
Member

  • Use hasReactRefresh to enable fast refresh in swc
  • Add isDevfallback to cache name to create a separate cache for the fallback compiler

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running yarn lint

@ijjk
Copy link
Member

ijjk commented Oct 24, 2021

Failing test suites

Commit: cd52d4f

test/development/basic-basepath/hmr.test.ts

  • basic HMR > Error Recovery > should recover after undefined exported as default
  • basic HMR > Hot Module Reloading > editing a page > should update styles correctly
Expand output

● basic HMR › Hot Module Reloading › editing a page › should update styles correctly

TIMED OUT: /200px/

100px

  437 |
  438 |   if (hardError) {
> 439 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content)
      |           ^
  440 |   }
  441 |   return false
  442 | }

  at Object.check (lib/next-test-utils.js:439:11)
  at Object.<anonymous> (development/basic-basepath/hmr.test.ts:165:13)

● basic HMR › Error Recovery › should recover after undefined exported as default

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `basic HMR Error Recovery should recover after undefined exported as default 1`

- Snapshot  - 3
+ Received  + 1

   1 of 1 unhandled error
- Server Error
+ Unhandled Runtime Error

  Error: The default export is not a React Component in page: "/hmr/about7"
-
- This error happened while generating the page. Any console logs will be displayed in the terminal window.

  599 |         await next.patchFile(aboutPage, aboutContent)
  600 |
> 601 |         if (browser) {
      |                       ^
  602 |           await check(
  603 |             () => getBrowserBodyText(browser),
  604 |             /This is the about page/

  at Object.<anonymous> (development/basic-basepath/hmr.test.ts:601:23)

@ijjk
Copy link
Member

ijjk commented Oct 24, 2021

Stats from current PR

Default Build
General Overall increase ⚠️
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
buildDuration 24.3s 24.4s ⚠️ +163ms
buildDurationCached 4.7s 4.8s ⚠️ +104ms
nodeModulesSize 196 MB 196 MB ⚠️ +430 B
Page Load Tests Overall increase ✓
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
/ failed reqs 0 0
/ total time (seconds) 4.196 4.025 -0.17
/ avg req/sec 595.76 621.14 +25.38
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 2.185 2.231 ⚠️ +0.05
/error-in-render avg req/sec 1144.18 1120.77 ⚠️ -23.41
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
450.126dd8f7..9662.js gzip 179 B 179 B
framework-89..a097.js gzip 42.2 kB 42.2 kB
main-4c83cbc..5816.js gzip 27.7 kB 27.7 kB
webpack-7ed4..c253.js gzip 1.45 kB 1.45 kB
Overall change 71.5 kB 71.5 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
polyfills-a4..dd70.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
_app-e2cfdd4..f20e.js gzip 1.23 kB 1.23 kB
_error-6679c..c50e.js gzip 194 B 194 B
amp-e55eb6be..a860.js gzip 312 B 312 B
css-3561b6c4..ef9e.js gzip 327 B 327 B
dynamic-3814..830e.js gzip 2.38 kB 2.38 kB
head-0b292cc..7d7c.js gzip 350 B 350 B
hooks-a534e8..efa1.js gzip 635 B 635 B
image-07bccd..d945.js gzip 4.44 kB 4.44 kB
index-d12b47..75f9.js gzip 263 B 263 B
link-a8a0a12..1f88.js gzip 1.87 kB 1.87 kB
routerDirect..6a79.js gzip 321 B 321 B
script-e1458..a8d4.js gzip 383 B 383 B
withRouter-b..6929.js gzip 318 B 318 B
9a34b27eb3f9..27d.css gzip 125 B 125 B
Overall change 13.2 kB 13.2 kB
Client Build Manifests
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
_buildManifest.js gzip 459 B 459 B
Overall change 459 B 459 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
index.html gzip 536 B 536 B
link.html gzip 548 B 548 B
withRouter.html gzip 529 B 529 B
Overall change 1.61 kB 1.61 kB

Default Build with SWC (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
buildDuration 20.6s 20.5s -95ms
buildDurationCached 4.9s 4.8s -40ms
nodeModulesSize 196 MB 196 MB ⚠️ +430 B
Page Load Tests Overall increase ✓
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
/ failed reqs 0 0
/ total time (seconds) 4.158 4.169 ⚠️ +0.01
/ avg req/sec 601.22 599.69 ⚠️ -1.53
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 2.202 2.187 -0.02
/error-in-render avg req/sec 1135.08 1142.87 +7.79
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
450.fd3ad245..022b.js gzip 179 B 179 B
framework-13..70b0.js gzip 50.8 kB 50.8 kB
main-30a0900..79fc.js gzip 36.1 kB 36.1 kB
webpack-9f86..1988.js gzip 1.57 kB 1.57 kB
Overall change 88.6 kB 88.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
polyfills-a4..dd70.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
_app-ae91bc3..d985.js gzip 1.33 kB 1.33 kB
_error-273ac..9ef0.js gzip 180 B 180 B
amp-5f9a7694..99ce.js gzip 315 B 315 B
css-3a1b2477..df1e.js gzip 330 B 330 B
dynamic-de3d..5a68.js gzip 2.72 kB 2.72 kB
head-7f600d0..daa3.js gzip 356 B 356 B
hooks-bd8c02..0730.js gzip 638 B 638 B
image-17d548..6bf2.js gzip 5.11 kB 5.11 kB
index-80be94..e89f.js gzip 262 B 262 B
link-b0ce9b3..48f4.js gzip 2.21 kB 2.21 kB
routerDirect..c4aa.js gzip 325 B 325 B
script-67da0..49e6.js gzip 390 B 390 B
withRouter-2..2409.js gzip 322 B 322 B
9a34b27eb3f9..27d.css gzip 125 B 125 B
Overall change 14.6 kB 14.6 kB
Client Build Manifests
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
_buildManifest.js gzip 459 B 459 B
Overall change 459 B 459 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js add/change-cache-name-fallback Change
index.html gzip 536 B 536 B
link.html gzip 548 B 548 B
withRouter.html gzip 530 B 530 B
Overall change 1.61 kB 1.61 kB
Commit: cd52d4f

@timneutkens timneutkens merged commit 417ad95 into canary Oct 24, 2021
@timneutkens timneutkens deleted the add/change-cache-name-fallback branch October 24, 2021 13:25
@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants