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 different keyed app route elements #2636

Merged
merged 4 commits into from Nov 9, 2022
Merged

add different keyed app route elements #2636

merged 4 commits into from Nov 9, 2022

Conversation

sokra
Copy link
Member

@sokra sokra commented Nov 8, 2022

This adds the missing error loading template not-found and head next to layout and page files in app dir

updates app renderer code to latest next.js updates

@sokra sokra requested a review from a team as a code owner November 8, 2022 10:52
@vercel
Copy link

vercel bot commented Nov 8, 2022

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

Name Status Preview Comments Updated
examples-svelte-web 🔄 Building (Inspect) Nov 9, 2022 at 7:15PM (UTC)
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Nov 9, 2022 at 7:15PM (UTC)
4 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Nov 9, 2022 at 7:15PM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Nov 9, 2022 at 7:15PM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Nov 9, 2022 at 7:15PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Nov 9, 2022 at 7:15PM (UTC)

"layout" => {
layout = Some(file);
"layout" | "error" | "loading" | "template" | "not-found" | "head" => {
files.insert(name.to_string(), file);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have a FileType enum with TryFrom<String>/Into<String> impls instead?

files could either be a HashMap<FileType, file> or a FileTypeMap which has specific fields for layout, error, etc. and an Iterator<Item = (FileType, File)> impl. I think going for the more specific FileTypeMap is better here.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

Benchmark for c4e66b9

Click to view benchmark
Test Base PR % sigificant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 36.9±0.36ms 37.0±0.26ms +0.27%
bench_hmr_to_commit/Turbopack RCC/1000 modules 37.2±0.45ms N/A N/A N/A
bench_hmr_to_commit/Turbopack SSR/1000 modules 36.9±0.20ms 36.8±0.25ms -0.27%
bench_hmr_to_eval/Turbopack CSR/1000 modules 4.8±0.88ms 5.2±1.24ms +8.33%
bench_hmr_to_eval/Turbopack RCC/1000 modules 327.4±662.30ms N/A N/A N/A
bench_hmr_to_eval/Turbopack SSR/1000 modules 25.9±10.99ms 24.9±13.51ms -3.86%
bench_hydration/Turbopack RCC/1000 modules 5.9±0.25s N/A N/A N/A
bench_hydration/Turbopack SSR/1000 modules 5.1±0.23s 5.1±0.20s
bench_startup/Turbopack CSR/1000 modules 2.5±0.05s 2.5±0.13s
bench_startup/Turbopack RCC/1000 modules 4.2±0.16s 4.4±0.06s +4.76%
bench_startup/Turbopack RSC/1000 modules 3.5±0.18s 3.6±0.13s +2.86%
bench_startup/Turbopack SSR/1000 modules 3.9±0.23s 3.8±0.03s -2.56%

@sokra sokra added the pr: automerge Kodiak will merge these automatically after checks pass label Nov 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

Benchmark for 89e81bc

Click to view benchmark
Test Base PR % sigificant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 38.5±0.35ms 6.6±0.99ms -82.86% -77.30%
bench_hmr_to_commit/Turbopack RCC/1000 modules 39.4±1.09ms 38.9±39.74ms -1.27%
bench_hmr_to_commit/Turbopack SSR/1000 modules 38.5±0.29ms 16.1±21.82ms -58.18%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7.7±4.86ms 5.8±0.92ms -24.68%
bench_hmr_to_eval/Turbopack RCC/1000 modules 238.5±727.94ms 39.4±38.83ms -83.48%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7.2±4.64ms 6.1±0.58ms -15.28%
bench_hydration/Turbopack RCC/1000 modules 8.2±0.16s 8.1±0.13s -1.22%
bench_hydration/Turbopack SSR/1000 modules 7.7±0.48s 7.6±0.23s -1.30%
bench_startup/Turbopack CSR/1000 modules 3.6±0.07s 3.7±0.28s +2.78%
bench_startup/Turbopack RCC/1000 modules 5.7±0.08s 5.7±0.11s
bench_startup/Turbopack RSC/1000 modules 4.8±0.05s 4.7±0.21s -2.08%
bench_startup/Turbopack SSR/1000 modules 5.1±0.38s 5.2±0.38s +1.96%

jridgewell pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
* add different keyed app route elements

* update for latest next.js canary version

* fix header name

* setup next.js version in benchmark
sokra added a commit to vercel/next.js that referenced this pull request Mar 13, 2023
* add different keyed app route elements

* update for latest next.js canary version

* fix header name

* setup next.js version in benchmark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants