next.js icon indicating copy to clipboard operation
next.js copied to clipboard

integrate fallback app and error into client compiler

Open sokra opened this issue 4 years ago • 2 comments

refactoring that gets rid of isDevFallback and the 3rd 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

sokra avatar Oct 19 '21 12:10 sokra

Stats from current PR

Default Build (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
buildDuration 15.1s 15.5s ⚠️ +401ms
buildDurationCached 3.8s 3.7s -124ms
nodeModulesSize 195 MB 195 MB -2.09 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
/ failed reqs 0 0
/ total time (seconds) 3.468 3.379 -0.09
/ avg req/sec 720.79 739.86 +19.07
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.617 1.674 ⚠️ +0.06
/error-in-render avg req/sec 1546.53 1493.58 ⚠️ -52.95
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
558.HASH.js gzip 3.02 kB 3.02 kB
779.HASH.js gzip 179 B 179 B
framework-HASH.js gzip 42.2 kB 42.2 kB
main-HASH.js gzip 25 kB 25 kB
webpack-HASH.js gzip 1.49 kB 1.49 kB
Overall change 71.9 kB 71.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-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 bugfix/get-rid-of-dev-fallback Change
_app-HASH.js gzip 977 B 977 B
_error-HASH.js gzip 3.11 kB 3.11 kB
amp-HASH.js gzip 553 B 553 B
css-HASH.js gzip 328 B 328 B
dynamic-HASH.js gzip 2.73 kB 2.73 kB
head-HASH.js gzip 2.37 kB 2.37 kB
hooks-HASH.js gzip 918 B 918 B
image-HASH.js gzip 5.85 kB 5.85 kB
index-HASH.js gzip 260 B 260 B
link-HASH.js gzip 1.66 kB 1.66 kB
routerDirect..HASH.js gzip 320 B 320 B
script-HASH.js gzip 386 B 386 B
withRouter-HASH.js gzip 319 B 319 B
bb14e60e810b..30f.css gzip 125 B 125 B
Overall change 19.9 kB 19.9 kB
Client Build Manifests
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
_buildManifest.js gzip 493 B 493 B
Overall change 493 B 493 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
index.html gzip 537 B 537 B
link.html gzip 549 B 549 B
withRouter.html gzip 531 B 531 B
Overall change 1.62 kB 1.62 kB

Default Build with SWC (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
buildDuration 7.9s 8s ⚠️ +142ms
buildDurationCached 3.6s 3.9s ⚠️ +326ms
nodeModulesSize 195 MB 195 MB -2.09 kB
Page Load Tests Overall increase ✓
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
/ failed reqs 0 0
/ total time (seconds) 3.578 3.495 -0.08
/ avg req/sec 698.66 715.36 +16.7
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.757 1.574 -0.18
/error-in-render avg req/sec 1423.14 1587.99 +164.85
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
675-HASH.js gzip 13.8 kB 13.8 kB
770.HASH.js gzip 178 B 178 B
framework-HASH.js gzip 50.8 kB 50.8 kB
main-HASH.js gzip 35.2 kB 35.2 kB
webpack-HASH.js gzip 1.64 kB 1.64 kB
Overall change 102 kB 102 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-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 bugfix/get-rid-of-dev-fallback Change
_app-HASH.js gzip 1.33 kB 1.33 kB
_error-HASH.js gzip 180 B 180 B
amp-HASH.js gzip 315 B 315 B
css-HASH.js gzip 331 B 331 B
dynamic-HASH.js gzip 2.79 kB 2.79 kB
head-HASH.js gzip 355 B 355 B
hooks-HASH.js gzip 637 B 637 B
image-HASH.js gzip 555 B 555 B
index-HASH.js gzip 261 B 261 B
link-HASH.js gzip 2.22 kB 2.22 kB
routerDirect..HASH.js gzip 326 B 326 B
script-HASH.js gzip 393 B 393 B
withRouter-HASH.js gzip 322 B 322 B
bb14e60e810b..30f.css gzip 125 B 125 B
Overall change 10.1 kB 10.1 kB
Client Build Manifests
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
_buildManifest.js gzip 511 B 511 B
Overall change 511 B 511 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js bugfix/get-rid-of-dev-fallback Change
index.html gzip 537 B 537 B
link.html gzip 551 B 551 B
withRouter.html gzip 532 B 532 B
Overall change 1.62 kB 1.62 kB
Commit: 921349055c090cf215c30155d0fd6063d4d0b9b6

ijjk avatar Oct 19 '21 12:10 ijjk

Failing test suites

Commit: 921349055c090cf215c30155d0fd6063d4d0b9b6

test/development/acceptance/ReactRefreshLogBox.test.ts

  • ReactRefreshLogBox > logbox: can recover from a syntax error without losing state
Expand output

● ReactRefreshLogBox › logbox: can recover from a syntax error without losing state

TIMED OUT: /Count: 1/

Count: 0

  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/acceptance/ReactRefreshLogBox.test.ts:53:9)

test/integration/server-asset-modules/test/index.test.js

  • serverside asset modules > dev mode > should enable reading local files in api routes
Expand output

● serverside asset modules › dev mode › should enable reading local files in api routes

expect(received).toEqual(expected) // deep equality

Expected: 200
Received: 500

  21 |   it('should enable reading local files in api routes', async () => {
  22 |     const res = await fetchViaHTTP(appPort, '/api/test', null, {})
> 23 |     expect(res.status).toEqual(200)
     |                        ^
  24 |     const content = await res.json()
  25 |     expect(content).toHaveProperty('message', 'hello world')
  26 |   })

  at Object.<anonymous> (integration/server-asset-modules/test/index.test.js:23:24)

test/integration/url/test/index.test.js

  • Handle new URL asset references in next dev > should respond on size api
Expand output

● Handle new URL asset references in next dev › should respond on size api

expect(received).toEqual(expected) // deep equality

Expected: {"size": 30079}
Received: false

  67 |       )
  68 |
> 69 |       expect(data).toEqual({ size: 30079 })
     |                    ^
  70 |     })
  71 |
  72 |     it('should respond on basename api', async () => {

  at Object.<anonymous> (integration/url/test/index.test.js:69:20)

test/integration/index-index/test/index.test.js

  • nested index.js > dev mode > should ssr page /index
  • nested index.js > dev mode > should client render page /index
  • nested index.js > dev mode > should follow link to /index
  • nested index.js > dev mode > should ssr page /index/index
  • nested index.js > dev mode > should client render page /index/index
  • nested index.js > dev mode > should follow link to /index/index
Expand output

● nested index.js › dev mode › should ssr page /index

expect(received).toBe(expected) // Object.is equality

Expected: "index > index"
Received: ""

  52 |     const html = await renderViaHTTP(appPort, '/index')
  53 |     const $ = cheerio.load(html)
> 54 |     expect($('#page').text()).toBe('index > index')
     |                               ^
  55 |   })
  56 |
  57 |   it('should client render page /index', async () => {

  at Object.<anonymous> (integration/index-index/test/index.test.js:54:31)

● nested index.js › dev mode › should client render page /index

page.waitForSelector: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for selector "#page"
============================================================

  201 |     return this.chain(() => {
  202 |       return page
> 203 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  204 |         .then(async (el) => {
  205 |           // it seems selenium waits longer and tests rely on this behavior
  206 |           // so we wait for the load event fire before returning

  at lib/browsers/playwright.ts:203:10

● nested index.js › dev mode › should follow link to /index

TIMED OUT: /^index > index$/

undefined

  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> (integration/index-index/test/index.test.js:72:7)

● nested index.js › dev mode › should ssr page /index/index

expect(received).toBe(expected) // Object.is equality

Expected: "index > index > index"
Received: ""

  136 |     const html = await renderViaHTTP(appPort, '/index/index')
  137 |     const $ = cheerio.load(html)
> 138 |     expect($('#page').text()).toBe('index > index > index')
      |                               ^
  139 |   })
  140 |
  141 |   it('should client render page /index/index', async () => {

  at Object.<anonymous> (integration/index-index/test/index.test.js:138:31)

● nested index.js › dev mode › should client render page /index/index

page.waitForSelector: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for selector "#page"
============================================================

  201 |     return this.chain(() => {
  202 |       return page
> 203 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  204 |         .then(async (el) => {
  205 |           // it seems selenium waits longer and tests rely on this behavior
  206 |           // so we wait for the load event fire before returning

  at lib/browsers/playwright.ts:203:10

● nested index.js › dev mode › should follow link to /index/index

TIMED OUT: /^index > index > index$/

undefined

  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> (integration/index-index/test/index.test.js:156:7)

ijjk avatar Oct 19 '21 13:10 ijjk