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

Misc. changes to support App Router build #5448

Merged
merged 14 commits into from
Jul 12, 2023

Conversation

alexkirsz
Copy link
Contributor

Description

Testing Instructions

@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-app-router-build-poc branch from 3f5271a to c5f7a68 Compare July 3, 2023 13:45
@vercel
Copy link

vercel bot commented Jul 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jul 11, 2023 10:18pm
10 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
examples-nonmonorepo ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm
turbo-site ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2023 10:18pm

@alexkirsz
Copy link
Contributor Author

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

✅ This change can build next-swc

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from 1dc1c82 to c410319 Compare July 4, 2023 09:45
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-app-router-build-poc branch from c5f7a68 to d5d2514 Compare July 4, 2023 09:45
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from c410319 to 5050577 Compare July 4, 2023 12:09
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-app-router-build-poc branch from d5d2514 to 7e1fa83 Compare July 4, 2023 12:09
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-app-router-build-poc branch from 7e1fa83 to ff6bc99 Compare July 5, 2023 14:56
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from 5050577 to 6a09e10 Compare July 5, 2023 15:19
Base automatically changed from alexkirsz/web-866-node-entry-chunk-name to main July 6, 2023 08:28
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-app-router-build-poc branch from ff6bc99 to 76ea246 Compare July 10, 2023 20:25
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-app-router-build-poc branch from d2da80f to 65a703f Compare July 10, 2023 21:13
@github-actions
Copy link
Contributor

Linux Benchmark for cd409da

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 6986.19µs ± 47.18µs 6974.30µs ± 48.16µs -0.17%
bench_hmr_to_eval/Turbopack CSR/1000 modules 6473.37µs ± 99.80µs 6580.31µs ± 305.67µs +1.65%
bench_startup/Turbopack CSR/1000 modules 823.70ms ± 2.46ms 816.38ms ± 2.07ms -0.89%

@github-actions
Copy link
Contributor

MacOS Benchmark for cd409da

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 8705.02ms ± 1963.70ms 3304.75ms ± 54.05ms -62.04% -28.57%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.96ms ± 0.04ms 28.18ms ± 0.15ms +0.80%
bench_hmr_to_eval/Turbopack CSR/1000 modules 25.87ms ± 0.92ms 27.43ms ± 0.12ms +6.04%
bench_startup/Turbopack CSR/1000 modules 8705.02ms ± 1963.70ms 3304.75ms ± 54.05ms -62.04% -28.57%

@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-app-router-build-poc branch from 637bf50 to ed97e7a Compare July 11, 2023 12:20
@github-actions
Copy link
Contributor

Linux Benchmark for 3ce691e

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 802.86ms ± 1.47ms 816.25ms ± 4.32ms +1.67% +0.22%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 6425.79µs ± 45.61µs 6437.08µs ± 34.76µs +0.18%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5916.91µs ± 16.49µs 6046.58µs ± 101.49µs +2.19%
bench_startup/Turbopack CSR/1000 modules 802.86ms ± 1.47ms 816.25ms ± 4.32ms +1.67% +0.22%

@github-actions
Copy link
Contributor

MacOS Benchmark for 3ce691e

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 22.92ms ± 0.71ms 28.54ms ± 0.10ms +24.53% +16.48%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 22.92ms ± 0.71ms 28.54ms ± 0.10ms +24.53% +16.48%
bench_hmr_to_eval/Turbopack CSR/1000 modules 27.80ms ± 0.37ms 27.83ms ± 0.12ms +0.11%
bench_startup/Turbopack CSR/1000 modules 3136.51ms ± 20.60ms 3202.08ms ± 70.36ms +2.09%

@github-actions
Copy link
Contributor

Linux Benchmark for b3a678f

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5402.66µs ± 33.83µs 5331.74µs ± 24.88µs -1.31%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5031.77µs ± 29.24µs 5132.94µs ± 104.76µs +2.01%
bench_startup/Turbopack CSR/1000 modules 799.52ms ± 1.28ms 799.85ms ± 3.25ms +0.04%

@github-actions
Copy link
Contributor

Linux Benchmark for ddebd2e

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5515.74µs ± 41.29µs 5419.45µs ± 26.00µs -1.75%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5109.39µs ± 19.13µs 5421.82µs ± 356.63µs +6.11%
bench_startup/Turbopack CSR/1000 modules 800.25ms ± 1.29ms 803.87ms ± 4.91ms +0.45%

@github-actions
Copy link
Contributor

MacOS Benchmark for ddebd2e

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 9216.72ms ± 635.44ms 4223.37ms ± 594.86ms -54.18% -31.88%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.80ms ± 0.09ms 27.56ms ± 0.22ms -0.89%
bench_hmr_to_eval/Turbopack CSR/1000 modules 24.62ms ± 1.20ms 26.78ms ± 0.20ms +8.75%
bench_startup/Turbopack CSR/1000 modules 9216.72ms ± 635.44ms 4223.37ms ± 594.86ms -54.18% -31.88%

@github-actions
Copy link
Contributor

Linux Benchmark for 5a92d73

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5341.11µs ± 22.91µs 5344.42µs ± 47.29µs +0.06%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5002.18µs ± 39.19µs 5205.47µs ± 213.06µs +4.06%
bench_startup/Turbopack CSR/1000 modules 799.89ms ± 1.47ms 806.44ms ± 4.10ms +0.82%

@github-actions
Copy link
Contributor

Linux Benchmark for 0b89ab9

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 5428.80µs ± 29.54µs 5447.75µs ± 33.42µs +0.35%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5034.76µs ± 29.69µs 5359.74µs ± 352.00µs +6.45%
bench_startup/Turbopack CSR/1000 modules 796.71ms ± 0.76ms 799.62ms ± 1.49ms +0.36%

@github-actions
Copy link
Contributor

Linux Benchmark for a972912

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 7215.99µs ± 146.57µs 6987.34µs ± 218.24µs -3.17%
bench_hmr_to_eval/Turbopack CSR/1000 modules 6284.63µs ± 198.82µs 5984.60µs ± 348.14µs -4.77%
bench_startup/Turbopack CSR/1000 modules 841.67ms ± 8.77ms 831.15ms ± 5.07ms -1.25%

@alexkirsz alexkirsz marked this pull request as ready for review July 12, 2023 08:44
@alexkirsz alexkirsz requested a review from a team as a code owner July 12, 2023 08:44
@alexkirsz alexkirsz merged commit 4a4e511 into main Jul 12, 2023
35 of 37 checks passed
@alexkirsz alexkirsz deleted the alexkirsz/web-866-app-router-build-poc branch July 12, 2023 08:44
sokra pushed a commit to vercel/next.js that referenced this pull request Jul 12, 2023
This PR adds proof-of-concept support for the App Router to `next build
--experimental-turbo`.

It introduces a new way to generate Next.js manifests in Turbopack.
Currently, in dev, we pass proxy objects in lieu of manifests, and rely
on the entries to know which chunks they need loaded on the client.
However, this can't work for builds because it requires control over
Next.js rendering, which is not compatible with a Next->Turbo approach.
We would need to modify Next.js to support these "lazy" entries. So for
now, we add well-known assets (`NextDynamicAsset`,
`NextServerComponentAsset`, `NextClientReferenceAsset`, etc.) to the
graph, which will get picked up when walking it during asset processing.
This lets us collect all possible entries before chunking.

This two-step process (collecting all entries, then chunking them) is
also a good first step towards production chunking.

## Turbopack updates

* vercel/turborepo#5494 <!-- Tobias Koppers - add
reporting of console messages -->
* vercel/turborepo#5448 <!-- Alex Kirszenberg -
Misc. changes to support App Router build -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

<!--
  ✍️ Write a short summary of your work.
  If necessary, include relevant screenshots.
-->

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

<!--
  ✍️ Write a short summary of your work.
  If necessary, include relevant screenshots.
-->

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

<!--
  ✍️ Write a short summary of your work.
  If necessary, include relevant screenshots.
-->

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants