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

fix(turbopack): Update app-renderer #4102

Merged
merged 8 commits into from
Mar 8, 2023
Merged

fix(turbopack): Update app-renderer #4102

merged 8 commits into from
Mar 8, 2023

Conversation

shuding
Copy link
Member

@shuding shuding commented Mar 7, 2023

Description

This PR mirrors some related manifest changes in Next.js: vercel/next.js#46881.

Testing Instructions

@vercel
Copy link

vercel bot commented Mar 7, 2023

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

Name Status Preview Comments Updated
examples-basic-web 🔄 Building (Inspect) Mar 8, 2023 at 5:27AM (UTC)
examples-svelte-web 🔄 Building (Inspect) Mar 8, 2023 at 5:27AM (UTC)
8 Ignored Deployments
Name Status Preview Comments Updated
examples-cra-web ⬜️ Ignored (Inspect) Mar 8, 2023 at 5:27AM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Mar 8, 2023 at 5:27AM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Mar 8, 2023 at 5:27AM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Mar 8, 2023 at 5:27AM (UTC)
examples-nonmonorepo ⬜️ Ignored (Inspect) Mar 8, 2023 at 5:27AM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Mar 8, 2023 at 5:27AM (UTC)
examples-vite-web ⬜️ Ignored (Inspect) Mar 8, 2023 at 5:27AM (UTC)
turbo-site ⬜️ Ignored (Inspect) Visit Preview Mar 8, 2023 at 5:27AM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

🟢 CI successful 🟢

Thanks

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

Benchmark for 6db060b

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack RCC/1000 modules 12.39ms ± 0.22ms N/A N/A N/A
bench_hmr_to_commit/Turbopack RSC/1000 modules 505.42ms ± 1.44ms N/A N/A N/A
bench_hmr_to_eval/Turbopack RCC/1000 modules 10.44ms ± 0.19ms N/A N/A N/A
bench_hydration/Turbopack RCC/1000 modules 3540.36ms ± 12.83ms N/A N/A N/A
bench_hydration/Turbopack RSC/1000 modules 3216.04ms ± 12.63ms N/A N/A N/A
bench_startup/Turbopack CSR/1000 modules 2591.88ms ± 8.18ms 2562.67ms ± 6.03ms -1.13% -0.03%
bench_startup/Turbopack RCC/1000 modules 2109.72ms ± 3.00ms 1983.19ms ± 2.72ms -6.00% -5.47%
bench_startup/Turbopack RSC/1000 modules 2039.63ms ± 6.26ms 1961.15ms ± 3.49ms -3.85% -2.91%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 9003.42µs ± 53.37µs 9053.89µs ± 19.71µs +0.56%
bench_hmr_to_commit/Turbopack RCC/1000 modules 12.39ms ± 0.22ms N/A N/A N/A
bench_hmr_to_commit/Turbopack RSC/1000 modules 505.42ms ± 1.44ms N/A N/A N/A
bench_hmr_to_commit/Turbopack SSR/1000 modules 9126.09µs ± 57.74µs 9239.30µs ± 26.40µs +1.24%
bench_hmr_to_eval/Turbopack CSR/1000 modules 8013.78µs ± 30.85µs 8009.05µs ± 35.19µs -0.06%
bench_hmr_to_eval/Turbopack RCC/1000 modules 10.44ms ± 0.19ms N/A N/A N/A
bench_hmr_to_eval/Turbopack SSR/1000 modules 8194.22µs ± 36.69µs 8227.43µs ± 38.78µs +0.41%
bench_hydration/Turbopack RCC/1000 modules 3540.36ms ± 12.83ms N/A N/A N/A
bench_hydration/Turbopack RSC/1000 modules 3216.04ms ± 12.63ms N/A N/A N/A
bench_hydration/Turbopack SSR/1000 modules 3308.13ms ± 10.53ms 3293.29ms ± 10.82ms -0.45%
bench_startup/Turbopack CSR/1000 modules 2591.88ms ± 8.18ms 2562.67ms ± 6.03ms -1.13% -0.03%
bench_startup/Turbopack RCC/1000 modules 2109.72ms ± 3.00ms 1983.19ms ± 2.72ms -6.00% -5.47%
bench_startup/Turbopack RSC/1000 modules 2039.63ms ± 6.26ms 1961.15ms ± 3.49ms -3.85% -2.91%
bench_startup/Turbopack SSR/1000 modules 2036.94ms ± 3.24ms 2051.46ms ± 4.42ms +0.71%

@shuding shuding marked this pull request as ready for review March 7, 2023 18:15
@shuding shuding requested a review from a team as a code owner March 7, 2023 18:15
@jridgewell jridgewell added the pr: automerge Kodiak will merge these automatically after checks pass label Mar 7, 2023
return __entry_css_files__;
}
return new Proxy({}, proxyMethodsForModule(name as string, css));
const [file, name] = (key as string).split("#");
Copy link
Member

Choose a reason for hiding this comment

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

The file could potentially contain # and the name could also potentially contain #. This is pretty unsafe to join with #.

Can't we encode all information into the JSON instead of joining with #.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what's a Next.js detail and what's a Turbopack detail. Is the name really supposed to be JSON, or is that a hack that we did? If we instead did an rsplit here, would that fix our hack without changing Next's behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

The JSON.parse is a hack inside Turbopack. That # was from React's upstream change: facebook/react#26300 and we had to encode it that way.

name can never contain # because it's the module's export name (export const foo) or *. But not sure if a filepath can contain the # symbol or not, I think it's unlikely.

Copy link
Member

Choose a reason for hiding this comment

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

The react change changes from filename and name as separate entities to a single id. next.js creates the file#name encoding here: https://github.com/vercel/next.js/blob/7e933a094c3f7a17ae085396633ad6525ccfb590/packages/next/src/build/webpack/loaders/next-flight-loader/module-proxy.ts#L168
We could also choose a different encoding, e. g. JSON.

folders can contain #, unlikely but some people do that /home/blah/#repos which already led to some trouble because we had some special behavior for fragments in webpack.

even export names will soon be able to support any string. There is a proposal for that.

But anyway...

Copy link
Contributor

Choose a reason for hiding this comment

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

I changed this to use an rsplit.

ijjk pushed a commit to vercel/next.js that referenced this pull request Mar 7, 2023
Reverts #46861. This requires
vercel/turborepo#4102 to be released and bindings to
be updated first.

~Also depends on #46896 to be merged first, and conflicts to be
resolved.~
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

Benchmark for 87275b3

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack RCC/1000 modules 12.38ms ± 0.20ms N/A N/A N/A
bench_hmr_to_commit/Turbopack RSC/1000 modules 517.89ms ± 2.04ms N/A N/A N/A
bench_hmr_to_eval/Turbopack RCC/1000 modules 10.97ms ± 0.15ms N/A N/A N/A
bench_hydration/Turbopack RCC/1000 modules 3643.24ms ± 10.69ms N/A N/A N/A
bench_hydration/Turbopack RSC/1000 modules 3249.46ms ± 11.18ms N/A N/A N/A
bench_startup/Turbopack RCC/1000 modules 2151.76ms ± 10.09ms 2022.15ms ± 8.60ms -6.02% -4.33%
bench_startup/Turbopack RSC/1000 modules 2053.25ms ± 7.71ms 1991.08ms ± 7.43ms -3.03% -1.57%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 9164.73µs ± 40.56µs 9211.28µs ± 37.68µs +0.51%
bench_hmr_to_commit/Turbopack RCC/1000 modules 12.38ms ± 0.20ms N/A N/A N/A
bench_hmr_to_commit/Turbopack RSC/1000 modules 517.89ms ± 2.04ms N/A N/A N/A
bench_hmr_to_commit/Turbopack SSR/1000 modules 9543.58µs ± 37.52µs 9595.29µs ± 52.77µs +0.54%
bench_hmr_to_eval/Turbopack CSR/1000 modules 8254.56µs ± 33.49µs 8275.53µs ± 39.11µs +0.25%
bench_hmr_to_eval/Turbopack RCC/1000 modules 10.97ms ± 0.15ms N/A N/A N/A
bench_hmr_to_eval/Turbopack SSR/1000 modules 8625.55µs ± 56.42µs 8487.37µs ± 36.89µs -1.60%
bench_hydration/Turbopack RCC/1000 modules 3643.24ms ± 10.69ms N/A N/A N/A
bench_hydration/Turbopack RSC/1000 modules 3249.46ms ± 11.18ms N/A N/A N/A
bench_hydration/Turbopack SSR/1000 modules 3356.26ms ± 8.43ms 3377.44ms ± 11.77ms +0.63%
bench_startup/Turbopack CSR/1000 modules 2658.55ms ± 8.35ms 2658.89ms ± 8.12ms +0.01%
bench_startup/Turbopack RCC/1000 modules 2151.76ms ± 10.09ms 2022.15ms ± 8.60ms -6.02% -4.33%
bench_startup/Turbopack RSC/1000 modules 2053.25ms ± 7.71ms 1991.08ms ± 7.43ms -3.03% -1.57%
bench_startup/Turbopack SSR/1000 modules 2064.02ms ± 3.96ms 2078.79ms ± 7.46ms +0.72%

@kodiakhq kodiakhq bot merged commit 4dcf133 into main Mar 8, 2023
@kodiakhq kodiakhq bot deleted the shu/1v7j branch March 8, 2023 05:47
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

Benchmark for 5c47b33

Test Base PR % Significant %
bench_hydration/Turbopack RCC/1000 modules 3744.40ms ± 23.75ms 3613.72ms ± 5.58ms -3.49% -1.95%
bench_hydration/Turbopack RSC/1000 modules 3372.95ms ± 18.79ms 3267.94ms ± 11.47ms -3.11% -1.33%
bench_startup/Turbopack CSR/1000 modules 2713.19ms ± 5.26ms 2668.62ms ± 8.33ms -1.64% -0.64%
bench_startup/Turbopack RCC/1000 modules 2183.27ms ± 4.92ms 2059.69ms ± 3.22ms -5.66% -4.94%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 10.02ms ± 0.09ms 9896.64µs ± 57.70µs -1.27%
bench_hmr_to_commit/Turbopack RCC/1000 modules 11.67ms ± 0.05ms 11.78ms ± 0.09ms +1.00%
bench_hmr_to_commit/Turbopack RSC/1000 modules 520.93ms ± 1.61ms 516.13ms ± 1.08ms -0.92%
bench_hmr_to_commit/Turbopack SSR/1000 modules 10.09ms ± 0.05ms 10.13ms ± 0.06ms +0.37%
bench_hmr_to_eval/Turbopack CSR/1000 modules 8901.55µs ± 30.22µs 8875.15µs ± 38.06µs -0.30%
bench_hmr_to_eval/Turbopack RCC/1000 modules 10.55ms ± 0.03ms 11.14ms ± 0.68ms +5.53%
bench_hmr_to_eval/Turbopack SSR/1000 modules 9027.62µs ± 40.28µs 8960.30µs ± 30.96µs -0.75%
bench_hydration/Turbopack RCC/1000 modules 3744.40ms ± 23.75ms 3613.72ms ± 5.58ms -3.49% -1.95%
bench_hydration/Turbopack RSC/1000 modules 3372.95ms ± 18.79ms 3267.94ms ± 11.47ms -3.11% -1.33%
bench_hydration/Turbopack SSR/1000 modules 3407.30ms ± 6.87ms 3406.31ms ± 2.82ms -0.03%
bench_startup/Turbopack CSR/1000 modules 2713.19ms ± 5.26ms 2668.62ms ± 8.33ms -1.64% -0.64%
bench_startup/Turbopack RCC/1000 modules 2183.27ms ± 4.92ms 2059.69ms ± 3.22ms -5.66% -4.94%
bench_startup/Turbopack RSC/1000 modules 2106.45ms ± 6.26ms 2089.07ms ± 17.45ms -0.82%
bench_startup/Turbopack SSR/1000 modules 2098.06ms ± 5.19ms 2105.91ms ± 3.52ms +0.37%

jridgewell added a commit to vercel/next.js that referenced this pull request Mar 10, 2023
### Description

This PR mirrors some related manifest changes in Next.js:
#46881.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: Justin Ridgewell <[email protected]>
sokra pushed a commit to vercel/next.js that referenced this pull request Mar 13, 2023
### Description

This PR mirrors some related manifest changes in Next.js:
#46881.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: Justin Ridgewell <[email protected]>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

This PR mirrors some related manifest changes in Next.js:
#46881.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: Justin Ridgewell <[email protected]>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

This PR mirrors some related manifest changes in Next.js:
#46881.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: Justin Ridgewell <[email protected]>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

This PR mirrors some related manifest changes in Next.js:
#46881.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: Justin Ridgewell <[email protected]>
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.

3 participants