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 HMR when module evaluation throws #4151

Merged
merged 2 commits into from
Mar 10, 2023
Merged

fix HMR when module evaluation throws #4151

merged 2 commits into from
Mar 10, 2023

Conversation

sokra
Copy link
Member

@sokra sokra commented Mar 10, 2023

Description

  • before a self accepting module was disconnected from it's parents and after an error in module evaluation it failed to continue updating.
  • now it keep being connected to its parents, allowing a HMR update to bubble to the parent when evaluation lead to an error

Testing Instructions

Introduce a syntax/parse error and fix it again

Co-authored-by: Alex Kirszenberg [email protected]

@vercel
Copy link

vercel bot commented Mar 10, 2023

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

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

@sokra sokra marked this pull request as ready for review March 10, 2023 10:34
@sokra sokra requested a review from a team as a code owner March 10, 2023 10:34
@sokra sokra requested a review from alexkirsz March 10, 2023 10:35
@sokra sokra added the pr: automerge Kodiak will merge these automatically after checks pass label Mar 10, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

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

See workflow summary for details

crates/turbopack-ecmascript/js/src/runtime.js Outdated Show resolved Hide resolved
crates/turbopack-ecmascript/js/src/runtime.js Show resolved Hide resolved
crates/turbopack-ecmascript/js/src/runtime.js Outdated Show resolved Hide resolved
@sokra sokra removed the pr: automerge Kodiak will merge these automatically after checks pass label Mar 10, 2023
@github-actions
Copy link
Contributor

Benchmark for 2583041

Test Base PR % Significant %
bench_hydration/Turbopack SSR/1000 modules 3284.33ms ± 5.95ms 3263.60ms ± 4.23ms -0.63% -0.01%
bench_startup/Turbopack CSR/1000 modules 2572.70ms ± 8.68ms 2541.01ms ± 4.05ms -1.23% -0.24%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 9901.90µs ± 26.53µs 9898.32µs ± 28.91µs -0.04%
bench_hmr_to_commit/Turbopack RCC/1000 modules 11.66ms ± 0.15ms 11.94ms ± 0.10ms +2.40%
bench_hmr_to_commit/Turbopack RSC/1000 modules 516.41ms ± 0.78ms 515.18ms ± 2.06ms -0.24%
bench_hmr_to_commit/Turbopack SSR/1000 modules 10.19ms ± 0.04ms 10.13ms ± 0.04ms -0.61%
bench_hmr_to_eval/Turbopack CSR/1000 modules 8987.52µs ± 41.27µs 9045.63µs ± 51.55µs +0.65%
bench_hmr_to_eval/Turbopack RCC/1000 modules 10.69ms ± 0.16ms 10.38ms ± 0.12ms -2.88%
bench_hmr_to_eval/Turbopack SSR/1000 modules 9171.19µs ± 51.76µs 9216.97µs ± 27.73µs +0.50%
bench_hydration/Turbopack RCC/1000 modules 3565.30ms ± 6.67ms 3570.58ms ± 11.43ms +0.15%
bench_hydration/Turbopack RSC/1000 modules 3208.71ms ± 12.11ms 3230.36ms ± 13.41ms +0.67%
bench_hydration/Turbopack SSR/1000 modules 3284.33ms ± 5.95ms 3263.60ms ± 4.23ms -0.63% -0.01%
bench_startup/Turbopack CSR/1000 modules 2572.70ms ± 8.68ms 2541.01ms ± 4.05ms -1.23% -0.24%
bench_startup/Turbopack RCC/1000 modules 2102.65ms ± 3.79ms 2104.05ms ± 4.91ms +0.07%
bench_startup/Turbopack RSC/1000 modules 2030.90ms ± 7.51ms 2032.41ms ± 5.21ms +0.07%
bench_startup/Turbopack SSR/1000 modules 2012.13ms ± 3.46ms 2008.65ms ± 2.25ms -0.17%

@sokra sokra added the pr: automerge Kodiak will merge these automatically after checks pass label Mar 10, 2023
@kodiakhq kodiakhq bot merged commit bfa1308 into main Mar 10, 2023
@kodiakhq kodiakhq bot deleted the sokra/bugfix/hmr-error branch March 10, 2023 12:01
@github-actions
Copy link
Contributor

Benchmark for 50dee6f

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 10.60ms ± 0.05ms 10.61ms ± 0.04ms +0.09%
bench_hmr_to_commit/Turbopack RCC/1000 modules 11.83ms ± 0.09ms 11.86ms ± 0.07ms +0.23%
bench_hmr_to_commit/Turbopack RSC/1000 modules 531.88ms ± 2.00ms 528.42ms ± 2.34ms -0.65%
bench_hmr_to_commit/Turbopack SSR/1000 modules 10.77ms ± 0.06ms 10.78ms ± 0.05ms +0.09%
bench_hmr_to_eval/Turbopack CSR/1000 modules 9677.50µs ± 39.59µs 9642.81µs ± 34.39µs -0.36%
bench_hmr_to_eval/Turbopack RCC/1000 modules 10.89ms ± 0.08ms 10.87ms ± 0.06ms -0.12%
bench_hmr_to_eval/Turbopack SSR/1000 modules 9780.23µs ± 52.42µs 9794.05µs ± 61.45µs +0.14%
bench_hydration/Turbopack RCC/1000 modules 3702.37ms ± 13.42ms 3722.24ms ± 10.20ms +0.54%
bench_hydration/Turbopack RSC/1000 modules 3326.54ms ± 14.06ms 3352.12ms ± 13.35ms +0.77%
bench_hydration/Turbopack SSR/1000 modules 3373.67ms ± 5.12ms 3368.40ms ± 5.05ms -0.16%
bench_startup/Turbopack CSR/1000 modules 2650.04ms ± 8.21ms 2644.92ms ± 8.33ms -0.19%
bench_startup/Turbopack RCC/1000 modules 2166.77ms ± 4.91ms 2162.29ms ± 3.65ms -0.21%
bench_startup/Turbopack RSC/1000 modules 2103.26ms ± 5.30ms 2101.20ms ± 5.80ms -0.10%
bench_startup/Turbopack SSR/1000 modules 2076.05ms ± 3.56ms 2073.32ms ± 3.75ms -0.13%

timneutkens pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
# Bugfixes

* vercel/turborepo#4149
* vercel/turborepo#4151

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

* before a self accepting module was disconnected from it's parents and
after an error in module evaluation it failed to continue updating.
* now it keep being connected to its parents, allowing a HMR update to
bubble to the parent when evaluation lead to an error

### Testing Instructions

Introduce a syntax/parse error and fix it again

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

* before a self accepting module was disconnected from it's parents and
after an error in module evaluation it failed to continue updating.
* now it keep being connected to its parents, allowing a HMR update to
bubble to the parent when evaluation lead to an error

### Testing Instructions

Introduce a syntax/parse error and fix it again

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

* before a self accepting module was disconnected from it's parents and
after an error in module evaluation it failed to continue updating.
* now it keep being connected to its parents, allowing a HMR update to
bubble to the parent when evaluation lead to an error

### Testing Instructions

Introduce a syntax/parse error and fix it again

Co-authored-by: Alex Kirszenberg <[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.

2 participants